View source: R/ck_params_nums.R
ck_params_nums | R Documentation |
This function allows to define perturbation parameters used to perturb cells in magnitude tables.
ck_params_nums(
type = "top_contr",
top_k = NULL,
ptab,
mult_params,
mu_c = 0,
same_key = TRUE,
use_zero_rkeys = FALSE,
path = NULL
)
type |
a character value defining the way to identify the
|
top_k |
it is ignored if |
ptab |
in this argument, one ore more perturbation tables are given as input. the following choices are possible:
[ptable::create_ptable())]: R:ptable::create_ptable())
|
mult_params |
an object derived with |
mu_c |
fixed extra protection amount ( |
same_key |
(logical) should original cell key ( |
use_zero_rkeys |
(logical) scalar defining if record keys of
units not contributing to a specific numeric variables should be
used ( |
path |
a scalar character specifying a path to which the parameters created with this functions should be written to (in yaml format) |
an object suitable as input to method $params_nums_set()
for the
perturbation of continous variables.
ck_flexparams()
# create a perturbation table using
# functionality from ptable-pkg; see help(pa = "ptable")
# this returns an extra ptable for very small cells
ptab <- ptable::pt_ex_nums(separation = TRUE)
# create parameters
ck_params_nums(
type = "top_contr",
top_k = 3,
ptab = ptab,
mult_params = ck_flexparams(
fp = 1000,
p = c(0.20, 0.03),
epsilon = c(1, 0.5, 0.2),
q = 2),
use_zero_rkeys = TRUE,
mu_c = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.