Learn R Programming

sdcMicro (version 4.6.0)

plot.sdcMicroObj: Plotfunctions for objects of class sdcMicroObj-class

Description

Descriptive plot function for Frequencies and local Supression, Recoding, categorical risk and numerical risk.

Usage

"plot"(x, type = "ls", ...)

Arguments

x
An object of class sdcMicroObj-class
type
specified what kind of plot will be generated
  • 'ls': plot of local suppressions in key variables
...
currently ignored

Details

Possible values for the type argument of the print function are: "freq": for Frequencies, "ls": for Local Supression output, "pram": for results of post-randomization "recode":for Recodes, "risk": forCategorical risk and "numrisk": for Numerical risk.

Possible values for the type argument of the freq function are: "fk": Sample frequencies and "Fk": weighted frequencies.

Examples

Run this code
data(testdata)
sdc <- createSdcObj(testdata,
  keyVars=c('urbrur','roof','walls','relat','sex'),
  pramVars=c('water','electcon'),
  numVars=c('expend','income','savings'), w='sampling_weight')
sdc <- kAnon(sdc, k=5)
plot(sdc, type="ls")

Run the code above in your browser using DataLab