Skip to contents

Preliminary function

Usage

RangeLimitsDefault(
  ...,
  rangePercent = 0,
  rangeMin = 0,
  primary,
  num,
  freq,
  freqVar,
  dominanceVar = NULL,
  intervalVar = NULL
)

Arguments

...

Unused parameters

rangePercent

Required interval width expressed as a percentage

rangeMin

Minimum required width of the interval

primary

primary

num

num

freq

freq

freqVar

freqVar

dominanceVar

dominanceVar

intervalVar

Numerical variable(s) for interval calculations. When NULL, dominanceVar, first numVar or freqVar will be used.

Value

matrix with named columns

Examples

dat <- SSBtoolsData("magnitude1")
dat["num2"] <- 1:nrow(dat)

SuppressDominantCells(data = dat, 
    numVar = "value", 
    formula = ~sector2 * geo + sector4 * eu, 
    contributorVar = "company", 
    n = 1:2, k = c(80, 99), 
    output = RangeOutputFunction, rangePercent = 10, rangeMin = 1)
#> [preAggregate 20*7->20*7]
#> [extraAggregate 20*7->10*7] Checking .....
#> GaussSuppression_numttHTT: .........:::::
#>         geo       sector4 freq value rlim_value primary suppressed
#> 1     Total         Total   20 462.3         NA   FALSE      FALSE
#> 2     Total       private   16 429.5         NA   FALSE      FALSE
#> 3     Total        public    4  32.8         NA   FALSE      FALSE
#> 4   Iceland         Total    4  37.1         NA   FALSE      FALSE
#> 5  Portugal         Total    8 162.5         NA   FALSE      FALSE
#> 6     Spain         Total    8 262.7         NA   FALSE      FALSE
#> 7     Total   Agriculture    4 240.2      24.02    TRUE       TRUE
#> 8     Total Entertainment    6 131.5         NA   FALSE      FALSE
#> 9     Total  Governmental    4  32.8         NA   FALSE      FALSE
#> 10    Total      Industry    6  57.8         NA   FALSE       TRUE
#> 11       EU         Total   16 425.2         NA   FALSE      FALSE
#> 12    nonEU         Total    4  37.1         NA   FALSE      FALSE
#> 13  Iceland       private    4  37.1         NA   FALSE      FALSE
#> 14 Portugal       private    6 138.9         NA   FALSE       TRUE
#> 15    Spain       private    6 253.5         NA   FALSE       TRUE
#> 16 Portugal        public    2  23.6       2.36    TRUE       TRUE
#> 17    Spain        public    2   9.2       1.00    TRUE       TRUE
#> 18       EU   Agriculture    4 240.2      24.02    TRUE       TRUE
#> 19       EU Entertainment    5 114.7         NA   FALSE       TRUE
#> 20    nonEU Entertainment    1  16.8       1.68    TRUE       TRUE
#> 21       EU  Governmental    4  32.8         NA   FALSE      FALSE
#> 22       EU      Industry    3  37.5         NA   FALSE       TRUE
#> 23    nonEU      Industry    3  20.3         NA   FALSE       TRUE

SuppressDominantCells(data = dat, 
    numVar = c("value", "num2"), 
    formula = ~sector2 * geo + sector4 * eu, 
    contributorVar = "company", 
    n = 1:2, k = c(80, 99), 
    output = RangeOutputFunction, 
    intervalVar = c("value","freq", "num2"), 
    rangePercent = c(10, 10, 30), rangeMin = c(1, 0.2222, 2.222))
#> [preAggregate 20*7->20*8]
#> Warning: Multiple numVar were supplied, only the first is used in candidates function.
#> Warning: Multiple numVar were supplied, only the first is suppressed.
#> [extraAggregate 20*8->10*8] Checking .....
#> GaussSuppression_numttHTT: .........:::::
#>         geo       sector4 freq value num2 rlim_value rlim_freq rlim_num2
#> 1     Total         Total   20 462.3  210         NA        NA        NA
#> 2     Total       private   16 429.5  160         NA        NA        NA
#> 3     Total        public    4  32.8   50         NA        NA        NA
#> 4   Iceland         Total    4  37.1   53         NA        NA        NA
#> 5  Portugal         Total    8 162.5   76         NA        NA        NA
#> 6     Spain         Total    8 262.7   81         NA        NA        NA
#> 7     Total   Agriculture    4 240.2   10      24.02    0.4000     3.000
#> 8     Total Entertainment    6 131.5   45         NA        NA        NA
#> 9     Total  Governmental    4  32.8   50         NA        NA        NA
#> 10    Total      Industry    6  57.8  105         NA        NA        NA
#> 11       EU         Total   16 425.2  157         NA        NA        NA
#> 12    nonEU         Total    4  37.1   53         NA        NA        NA
#> 13  Iceland       private    4  37.1   53         NA        NA        NA
#> 14 Portugal       private    6 138.9   53         NA        NA        NA
#> 15    Spain       private    6 253.5   54         NA        NA        NA
#> 16 Portugal        public    2  23.6   23       2.36    0.2222     6.900
#> 17    Spain        public    2   9.2   27       1.00    0.2222     8.100
#> 18       EU   Agriculture    4 240.2   10      24.02    0.4000     3.000
#> 19       EU Entertainment    5 114.7   40         NA        NA        NA
#> 20    nonEU Entertainment    1  16.8    5       1.68    0.2222     2.222
#> 21       EU  Governmental    4  32.8   50         NA        NA        NA
#> 22       EU      Industry    3  37.5   57         NA        NA        NA
#> 23    nonEU      Industry    3  20.3   48         NA        NA        NA
#>    primary suppressed
#> 1    FALSE      FALSE
#> 2    FALSE      FALSE
#> 3    FALSE      FALSE
#> 4    FALSE      FALSE
#> 5    FALSE      FALSE
#> 6    FALSE      FALSE
#> 7     TRUE       TRUE
#> 8    FALSE      FALSE
#> 9    FALSE      FALSE
#> 10   FALSE       TRUE
#> 11   FALSE      FALSE
#> 12   FALSE      FALSE
#> 13   FALSE      FALSE
#> 14   FALSE       TRUE
#> 15   FALSE       TRUE
#> 16    TRUE       TRUE
#> 17    TRUE       TRUE
#> 18    TRUE       TRUE
#> 19   FALSE       TRUE
#> 20    TRUE       TRUE
#> 21   FALSE      FALSE
#> 22   FALSE       TRUE
#> 23   FALSE       TRUE