dimVar
,
hierarchies
, or formula
is specified.
dimVar
was
automatically generated from the remaining columns.SuppressDominantCells()
and the underlying function
MagnitudeRule()
have been improved:
contributorVar
(charVar
) can now be
combined with sWeightVar
.protectZeros
. See this parameter’s
documentation in ?MagnitudeRule
.removeCodesFraction
allows adjustment of
the effect of the removeCodes
parameter.apply_abs_directly
determines how
negative values are treated in the rules:
apply_abs_directly = FALSE
(default), absolute
values are taken after summing contributions, as performed by
max_contribution()
in the SSBtools
package.apply_abs_directly = TRUE
, absolute values are
computed directly on the input values, prior to any summation [beyond
preAggregate
]. This corresponds to the old behavior of the
function.allDominance = TRUE
:
primary.2:80
((2,80) dominance)) is now dominant2
.allDominance
parameter.MaxContribution()
with the improved
max_contribution()
from SSBtools.tibble
and data.table
input (parameter data
).
as.data.frame()
where necessary to ensure consistent
behavior.preAggregate
is TRUE
and
aggregatePackage
is "data.table"
, the use of
as.data.frame()
is skipped to avoid unnecessary
back-and-forth conversion of data.table
objects, preserving
efficiency.GaussSuppressionFromData()
and its
wrappers.SSBtools
functions FormulaSelection()
and its identical wrapper formula_selection()
are now
re-exported.
library(SSBtools)
is no longer
necessary to access them.Output from functions like get_klass()
in the klassR package or
hier_create()
in the sdcHierarchies
package can now be used directly as input. Example of usage:
<- get_klass(classification = "24")
a <- hier_create(root = "Total", nodes = LETTERS[1:5])
b <- data.frame(tree = sample(a$code[nchar(a$code) > 1], 200, replace = TRUE),
mydata letter = LETTERS[1:5])
SuppressSmallCounts(mydata, maxN = 3, hierarchies = list(tree = a, letter = b))
New possibilities for working with both formulas and hierarchies
are now available through the map_hierarchies_to_data()
function.
Improved functionality for combining formulas with the
Formula2ModelMatrix()
parameter
avoidHierarchical = TRUE
, thanks to the new
total_collapse()
function which can be applied to
output.
NAomit
to
SSBtools::Formula2ModelMatrix()
:
TRUE
, NAs in the grouping variables are omitted in
output and not included as a separate category.GaussSuppressionFromData()
and its wrappers.aggregateNA
is new parameter to
GaussSuppressionFromData()
:
TRUE
(default) to utilize the above
NAomit
parameter.aggregatePackage
to
"data.table"
to utilize this possibility.
aggregatePackage
is parameter to
GaussSuppressionFromData()
and its wrappers.aggregateBaseOrder
and rowGroupsPackage
.remove0
parameter in
SuppressFewContributors/NContributorsRule
introduced in
version 0.8.0. When a single numVar
was used as input, the
remove0
functionality failed.SuppressDominantCells()
is now considered a common
function for both the nk-dominance rule and the p-percent rule.
pPercent
parameter is now exposed in the
SuppressDominantCells()
documentation.n
parameter in SuppressDominantCells()
now defaults to 1:length(k)
.
GaussSuppression()
,
"anySum"
in
GaussSuppression()
to align with best theory.
singletonMethod
to either "anySumOld"
or
"anySumNOTprimaryOld"
.lpPackage
parameter, further suppression
will be performed to satisfy the interval width requirements.
rangePercent
: Required interval width expressed as a
percentagerangeMin
: Minimum required width of the intervalsingletonMethod = "numttHTT"
,
has been introduced in the wrappers SuppressDominantCells()
and SuppressFewContribitors()
. This setting represents the
method that offers the highest level of protection. However, it should
be noted that with this setting, the computational load of the
suppression algorithm may double, which could potentially lead to a
doubling of the execution time as well. During these computations, “:::”
will be displayed instead of “….”.
singletonMethod = "numttHtT"
.singletonMethod = "numttH"
.singletonMethod = "numttT"
.singletonMethod = "none"
.?SSBtools::NumSingleton
.SuppressDominantCells()
and SuppressFewContributors()
wrappers.
dominanceVar
and
candidatesVar
.removeCodes
parameter is now also available in the
DominanceRule()
and SuppressDominantCells()
functions.contributorVar
(charVar
) in the SuppressFewContributors()
and
NContributorsRule()
functions.SuppressDominantCells()
includes special
functionality to prevent zero cells, which have been suppressed, from
being revealable in cases where negative values cannot occur. See the
parameter singletonZeros
.pPercent
parameter directly through
SuppressDominantCells()
.PPercentRule()
.
PPercentRule()
and
DominanceRule()
now serve as wrappers for the newly
introduced. general function MagnitudeRule()
.AdditionalSuppression()
generalized to take a wrappers
as input.PrimaryRemoveWg()
, CandidatesNumWg()
and
ForcedWg()
ComputeIntervals()
.lpPackage
parameter is specified in
GaussSuppressionFromData()
or in any of its wrappers,
intervals for primary suppressed cells will be computed and included in
the output.SuppressDominantCells()
and
SuppressFewContributors()
.
extraAggregate = TRUE
in the specs,
dominanceSpec
and fewContributorsSpec
.PackageSpecs()
.SuppressSmallCounts()
,
SuppressDominantCells()
, and
SuppressFewContributors()
, along with
SuppressKDisclosure()
(which was available in the previous
version).PackageSpecs()
.DominanceRule()
.SSBtools::GaussSuppression()
.SingletonUniqueContributor()
.forced
and usafe
are possible output
columns.
forcedInOutput
and
unsafeInOutput
to
GaussSuppressionFromData()
.freqVar
and weightVar
, are kept in the output.
"freq"
and "weight"
.freqVar
/weightVar
than
"freq"
/"weight"
needs to be updated."freq"
is still default when data is aggregated from
microdata without freqVar
specified (see new parameter
freqVarNew
).