Description Usage Arguments Details Value Author(s) Examples
The function make use of CoverMarginsExact
.
1 2 3 4 5 6 7 8 9 10 |
data |
Input data as a data frame (inner cells) |
freqVar |
Variable holding counts (name or number) |
formula |
Model formula defining cells to be perturbed |
formulaExact |
Model formula defining cells to be exact |
eps |
Differential privacy parameter |
pMatrix |
Output from |
keyVar |
Variable holding uniformly distributed keys (name or number). See details. |
... |
Further parameters to |
In this function individual keys (cell keys) are not taken as input.
Possible individual keys must be "summed up" to inner cell keys beforehand.
Zeros keys corresponding to zero frequencies are unproblematic when zeros are not perturbed.
By default (keyVar==NULL
), the keys corresponding to nonzero frequencies are generated by runif (otherwise zero).
A list
Øyvind Langsrud
1 2 3 4 5 6 | z2 <- EasyData("z2")
a1 <- NoisyCoverMargins(z2, "ant", ~region + kostragr * hovedint)
a2 <- NoisyCoverMargins(z2, "ant", ~region + kostragr * hovedint, ~kostragr + hovedint, eps = 0.25)
a3 <- NoisyCoverMargins(cbind(z2,keyVar = runif(44) * (z2$ant>0)), "ant",
~region + kostragr * hovedint, ~kostragr + hovedint,
pMatrix = Pmatrix(), keyVar = "keyVar")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.