pram {sdcMicro} | R Documentation |
PRAM is a probabilistic, perturbative method which can be applied on categorical variables.
pram(x, pd=0.8, alpha=0.5)
x |
a numeric vector or factor |
pd |
minimum diagonal entries for the generated transition matrix P. Either a vector of length 1 or a vector of length ( number of categories ). |
alpha |
amout of perturbation for the invariant Pram method |
The method is implemented exactly as descibed in the citation in the references. First a transition matrix is created in that way, that the diagonal entries of a matrix P are random numbers between ‘pd’ and 1. The remaining enties of the matrix are generated such that the rowSums of the matrix is 1. Then a invariant transition matrix is generated.
x |
original vector |
xpramed |
the perturbed vector |
pd |
randomly generated diagonal entry of the P (between original pd and 1) |
Rs |
invariant transition matrix |
alpha |
amout of perturbation for the invariant Pram method |
Matthias Templ
Shlomo, Natalie and de Waal, Ton (2006) Protection of Micro-data Subject to Edit Constraints Against Statistical Disclosure. Southampton, UK, Southampton Statistical Sciences Research Institute, 36pp. (S3RI Methodology Working Papers, M06/16)
set.seed(123) x <- sample(1:4, 250, replace=TRUE) pr1 <- pram(x) length(which(pr1$x == x)) x2 <- sample(1:4, 250, replace=TRUE) length(which(pram(x2)$x == x2)) data(free1) marstatPramed <- pram(free1[,"MARSTAT"])