SuppressKDisclosure() and related functions.
SuppressKDisclosure() is now:
Frequency table suppression for targeted attribute disclosure protection.identifying in SuppressKDisclosure() to specify
information that an intruder may already know.sensitive in SuppressKDisclosure() to specify
information considered unacceptable to disclose.default_targeting() parameters targeting_include and
targeting_exclude.targeting parameter in KDisclosurePrimary() (see its documentation for
details). The targeting specification may be generated by a function
(default: default_targeting()), similar to other user-supplied functions.
The parameters identifying and sensitive are included as explicit
arguments in SuppressKDisclosure(), but are in fact arguments of
default_targeting().singletonMethod for SuppressKDisclosure() has been updated
(via PackageSpecs()) from "anySumNOTprimary" to "anySum0".
See ?SSBtools::GaussSuppression for details.min_n_contr, min_n_non0_contr, min_n_contr_all, min_n_non0_contr_all)
to MagnitudeRule(), the primary-suppression function used by
SuppressDominantCells().
SuppressDominantCells().SuppressDominantCells() without
specifying either pPercent or k.SuppressFewContributors() with corresponding calls to
SuppressDominantCells() using the new parameters.SuppressDominantCells().da_vars, da_fun, and da_args) to enable
the use of SSBtools::dummy_aggregate() within GaussSuppressionFromData()
and its wrappers.
SSBtools::aggregate_multiple_fun() in the same way as when using
SSBtools::model_aggregate().da_out),
which is available to user-supplied functions and whose columns are added
to the final output.action_unused_dots changed from "inform" to "warn" to make
messages easier for users to recognise and interpret as non-critical warnings.total parameter can be specified as a named vector or named list.tables_by_formulas() has been updated so that named
total vectors are handled flexibly with both substitute_vars and collapse_vars.names(), and the list names were not used.removeCodes without contributorVar (rare case) affects singleton
SuppressDominantCells() and SuppressFewContributors().origIdxVar, which is also introduced
as a new GaussSuppressionFromData() parameter and generated in the
extraAggregate step.... using
ellipsis::check_dots_used(),
so that misspelled or irrelevant arguments are not silently ignored.
GaussSuppressionFromData(), available through all wrappers:
action_unused_dots controls how unused arguments are handled.allowed_unused_dots specifies argument names to ignore in the unused-argument check.GaussSuppression.action_unused_dots and
GaussSuppression.allowed_unused_dots.action_unused_dots is "inform" as a cautious starting point.
This may change to "warn" in a future release.preAggregate in SuppressSmallCounts().
SuppressKDisclosure().NA in GaussSuppressionFromData() and by updating the specs to use NA as default.
preAggregate = NA, the function now decides automatically: aggregation is applied unless freqVar is present
and the data contain no duplicated rows with respect to the relevant variables.lpPackage together with
protectionIntervals = TRUE in SuppressDominantCells(), tables can now
be protected according to the protection levels described in
Handbook on Statistical Disclosure Control (2nd ed., Ch. 4.2.2, 2025).SuppressSmallCounts(),
where the protectionIntervals parameter can be used to include some interval requirements.?IntervalLimits and the parameter description of lpPackage in
?GaussSuppressionFromData for details.intervalSuppression to GaussSuppressionFromData() and its wrappers.
lpPackage is specified).SuppressLinkedTables() and linkedGauss:
"super-consistent" is now the linkedGauss default in SuppressLinkedTables(),
providing stronger coordination across tables than "consistent".collapseAware for stronger coordination across tables than recordAware.lpPackage, rangePercent, and rangeMin can now be used with this functionality.linkedIntervals to determine how interval calculations are performed.aggregateNA parameter in GaussSuppressionFromData():
SuppressLinkedTables() and linkedGauss
for consistent suppression of linked tables
SuppressLinkedTables(), or alternatively by using the
new parameter linkedGauss in GaussSuppressionFromData() and its wrappers.GaussSuppressionFromData():
recordAware and linkedTables.maxN with variable-specific values.
SuppressionFromDecimals() are now prevented.
elimination (4th character) in ?SSBtools::NumSingleton will be slightly improved.tables_by_formulas(), which is now reexported, is demonstrated in a
SuppressSmallCounts() example and a SuppressDominantCells() example.Extend0fromModelMatrixInput() is now used in data pre-processing.
As a result, hierarchical_extend0 is now a possible parameter, as illustrated in a SuppressSmallCounts() example.use_freqVar to allow decimal numbers to be generated solely from 0s, improving stability.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.get_klass() in the
klassR package
or hier_create() in the
sdcHierarchies package
can now be used directly as input. Example of usage:
a <- get_klass(classification = "24")
b <- hier_create(root = "Total", nodes = LETTERS[1:5])
mydata <- data.frame(tree = sample(a$code[nchar(a$code) > 1], 200, replace = TRUE),
letter = LETTERS[1:5])
SuppressSmallCounts(mydata, maxN = 3, hierarchies = list(tree = a, letter = b))
map_hierarchies_to_data() function.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).