Build table and apply Cell Key Method
Source:R/tabuler_et_appliquer_ckm.R
tabulate_and_apply_ckm.Rd
This function constructs a contingency table from microdata and applies the Cell Key Method for statistical disclosure control.
Usage
tabulate_and_apply_ckm(
df,
rk_var = "rkey",
cat_vars = NULL,
hrc_vars = NULL,
num_var = NULL,
marge_label = "Total",
D,
V,
js = 0,
I = NULL,
J = NULL,
...
)
Arguments
- df
data.frame. Input microdata
- rk_var
Character. Individual key variable (NULL for no keys)
- cat_vars
Character vector. Categorical variables
- hrc_vars
Named list. Hierarchical variables
- num_var
Character. Numerical variable to aggregate
- marge_label
Character. Margin label (default: "Total")
- D
integer. Deviation parameter (must be strictly positive)
- V
numeric. Noise variance (must be strictly positive)
- js
integer. Threshold for sensitive values (default: 0). If js=0, only value 0 will be forbidden
- I
integer vector. Original values to consider
- J
integer vector. Perturbed values to consider
- ...
Additional parameters passed to transition matrix creation