SuppressionFromDecimals {GaussSuppression}R Documentation

Cell suppression from synthetic decimal numbers

Description

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.

Usage

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

Details

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

Value

Aggregated data with suppression information

Author(s)

Øyvind Langsrud

Examples

z2 <- SSBtoolsData("z2")

# Find suppression and decimal numbers with "fylke" in model 
a <- GaussSuppressDec(z2, dimVar = c("region", "fylke", "hovedint"), 
                      freqVar = "ant", protectZeros = FALSE, maxN = 2, 
                      output = "inner")

# Add decimal numbers to data 
z2$freqDec <- a$freqDec

# Find suppression with "kostragr" in model 
b <- SuppressionFromDecimals(z2, dimVar = c("region", "kostragr", "hovedint"), 
                             freqVar = "ant", decVar = "freqDec")

[Package GaussSuppression version 0.8.3 Index]