dataGen | R Documentation |
Fast generation of (primitive) synthetic multivariate normal data.
dataGen(obj, ...)
obj |
an |
... |
see possible arguments below
|
Uses the cholesky decomposition to generate synthetic data with approx. the same means and covariances. For details see at the reference.
the generated synthetic data.
With this method only multivariate normal distributed data with approxiomately the same covariance as the original data can be generated without reflecting the distribution of real complex data, which are, in general, not follows a multivariate normal distribution.
Matthias Templ
Mateo-Sanz, Martinez-Balleste, Domingo-Ferrer. Fast Generation of Accurate Synthetic Microdata. International Workshop on Privacy in Statistical Databases PSD 2004: Privacy in Statistical Databases, pp 298-306.
sdcMicroObj-class
, shuffle
data(mtcars)
cov(mtcars[,4:6])
cov(dataGen(mtcars[,4:6]))
pairs(mtcars[,4:6])
pairs(dataGen(mtcars[,4:6]))
## for objects of class sdcMicro:
data(testdata2)
sdc <- createSdcObj(testdata2,
keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'),
numVars=c('expend','income','savings'), w='sampling_weight')
sdc <- dataGen(sdc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.