SuppressionFromDecimals function

Cell suppression from synthetic decimal numbers

Cell suppression from synthetic decimal numbers

Decimal numbers, as calculated by GaussSuppressDec, are used to decide suppression (whole numbers or not). Technically, the calculations are done via GaussSuppressionFromData, but without running GaussSuppression. All suppressed cells are primary suppressed.

SuppressionFromDecimals( data, decVar, freqVar = NULL, numVar = NULL, preAggregate = FALSE, digits = 9, ... )

Arguments

  • data: Input data as a data frame
  • decVar: One ore several (nRep>1) decimal number variables.
  • freqVar: A single variable holding counts (not needed)
  • numVar: Other numerical variables to be aggregated
  • preAggregate: Parameter to GaussSuppressionFromData
  • digits: Parameter to RoundWhole. Values close to whole numbers will be rounded.
  • ...: Other parameters to GaussSuppressionFromData

Returns

Aggregated data with suppression information

Details

Several decimal number variables reduce the probability of obtaining whole numbers by chance.

Examples

z2 <- SSBtoolsData("z2") # Find suppression and decimal numbers with "fylke" in model a1 <- GaussSuppressDec(z2, fun = SuppressSmallCounts, dimVar = c("region", "fylke", "hovedint"), freqVar = "ant", protectZeros = FALSE, maxN = 2, output = "inner") # Add decimal numbers to data z2$freqDec <- a1$freqDec # Find suppression with "kostragr" in model a2 <- SuppressionFromDecimals(z2, dimVar = c("region", "kostragr", "hovedint"), freqVar = "ant", decVar = "freqDec") tail(a2) b1 <- GaussSuppressDec(data = SSBtoolsData("magnitude1"), fun = SuppressDominantCells, numVar = "value", formula = ~sector2 * geo + sector4 * eu, contributorVar = "company", k = c(80, 99)) b2 <- SuppressionFromDecimals(b1[b1$isInner, ], formula = ~(sector2 + sector4) * eu, numVar = "value", decVar = "freqDec") FormulaSelection(b2, ~sector2 * eu)

Author(s)

Øyvind Langsrud