Learn R Programming

sdcMicro (version 4.5.0)

addNoise: Adding noise to perturb data

Description

Various methods for adding noise to perturb continuous scaled variables.

Usage

addNoise(obj, variables,noise=150,method="additive",...)#,p,delta)

Arguments

obj
either a data frame, matrix or a sdcMicroObj that should be perturbed
variables
vector with names of variables that should be perturbed
noise
amount of noise (in percentages)
method
choose between additive, correlated, correlated2, restr, ROMM, outdect
...
see possible arguments below
p
multiplication factor for method ROMM
delta
parameter for method correlated2, details can be found in the reference below.

Value

  • If obj was of class sdcMicroObj the corresponding slots are filled, like manipNumVars, risk and utility. If obj was of class data.frame or matrix an object of class micro with following entities is returned:
  • xthe original data
  • xmthe modified (perturbed) data
  • methodmethod used for perturbation
  • noiseamount of noise

Details

If obj is of class sdcMicroObj all continuous key variables are selected per default. If obj is of class data.frame or matrix, the continuous variables have to be specified. Method additive adds noise completely at random to each variable depending on there size and standard deviation. correlated and method correlated2 adds noise and preserves the covariances as descriped in R. Brand (2001) or in the reference given below. Method restr takes the sample size into account when adding noise. Method ROMM is an implementation of the algorithm ROMM (Random Orthogonalized Matrix Masking) (Fienberg, 2004). Method outdect adds noise only to outliers. The outliers are idedentified with univariate and robust multivariate procedures based on a robust mahalanobis distancs calculated by the MCD estimator.

References

Domingo-Ferrer, J. and Sebe, F. and Castella, J., On the security of noise addition for privacy in statistical databases, Lecture Notes in Computer Science, vol. 3050, pp. 149-161, 2004. ISSN 0302-9743. Vol. Privacy in Statistical Databases, eds. J. Domingo-Ferrer and V. Torra, Berlin: Springer-Verlag. http://crises-deim.urv.cat/webCrises/publications/isijcr/lncs3050OntheSec.pdf, Ting, D. Fienberg, S.E. and Trottini, M. ROMM Methodology for Microdata Release Joint UNECE/Eurostat work session on statistical data confidentiality, Geneva, Switzerland, 2005, http://www.unece.org/fileadmin/DAM/stats/documents/ece/ces/ge.46/2005/wp.11.e.pdf Ting, D., Fienberg, S.E., Trottini, M. Random orthogonal matrix masking methodology for microdata release, International Journal of Information and Computer Security, vol. 2, pp. 86-105, 2008. Templ, M. and Meindl, B., Robustification of Microdata Masking Methods and the Comparison with Existing Methods, Lecture Notes in Computer Science, Privacy in Statistical Databases, vol. 5262, pp. 177-189, 2008. Templ, M. New Developments in Statistical Disclosure Control and Imputation: Robust Statistics Applied to Official Statistics, Suedwestdeutscher Verlag fuer Hochschulschriften, 2009, ISBN: 3838108280, 264 pages. Templ, M. and Meindl, B.: Practical Applications in Statistical Disclosure Control Using R, Privacy and Anonymity in Information Management Systems New Techniques for New Practical Problems, Springer, 31-62, 2010, ISBN: 978-1-84996-237-7.

See Also

sdcMicroObj-class, summary.micro

Examples

Run this code
data(Tarragona)
a1 <- addNoise(Tarragona)
a1

data(testdata)
testdata[, c('expend','income','savings')] <- 
addNoise(testdata[,c('expend','income','savings')])$xm

## for objects of class sdcMicroObj:
data(testdata2)
sdc <- createSdcObj(testdata2, 
  keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'),
  numVars=c('expend','income','savings'), w='sampling_weight')
sdc <- addNoise(sdc)

Run the code above in your browser using DataLab