A Function for the comparison of different perturbation methods.

valTable(
  x,
  method = c("simple", "onedims", "clustpppca", "addNoise: additive", "swappNum"),
  measure = "mean",
  clustermethod = "clara",
  aggr = 3,
  nc = 8,
  transf = "log",
  p = 15,
  noise = 15,
  w = 1:dim(x)[2],
  delta = 0.1
)

Arguments

x

a data.frame or a matrix

method

character vector defining names of microaggregation-, adding-noise or rank swapping methods.

measure

FUN for aggregation. Possible values are mean (default), median, trim, onestep.

clustermethod

clustermethod, if a method will need a clustering procedure

aggr

aggregation level (default=3)

nc

number of clusters. Necessary, if a method will need a clustering procedure

transf

Transformation of variables before clustering.

p

Swapping range, if method swappNum has been chosen

noise

noise addition, if an addNoise method has been chosen

w

variables for swapping, if method swappNum has been chosen

delta

parameter for adding noise method "correlated2"

Value

Measures of information loss splitted for the comparison of different methods.

Details

Tabularize the output from summary.micro(). Will be enhanced to all perturbation methods in future versions.

Methods for adding noise should be named via addNoise:{method}, e.g. addNoise:correlated, where {method} specifies the desired method as described in addNoise().

References

Templ, M. and Meindl, B., Software Development for SDC in R, Lecture Notes in Computer Science, Privacy in Statistical Databases, vol. 4302, pp. 347-359, 2006.

Author

Matthias Templ

Examples

data(Tarragona)
# \donttest{
valTable(
  x = Tarragona[100:200, ],
  method=c("simple", "onedims", "pca")
)
#> method 1|3: 'simple'
#> --> compute results
#> --> compute summary statistics
#> method 2|3: 'onedims'
#> --> compute results
#> --> compute summary statistics
#> method 3|3: 'pca'
#> --> compute results
#> --> compute summary statistics
#>    method amean amedian aonestep devvar  amad  acov   acor acors  adlm apcaload
#> 1  simple     0   3.435    1.664  9.704 2.506 4.852  8.156 3.632 1.043   16.837
#> 2 onedims     0   0.383    0.110  4.400 0.457 2.200  2.365 0.138 0.348   11.747
#> 3     pca     0   1.827    1.021 16.905 3.061 8.452 20.667 7.787 0.574   17.478
#>   apppcaload atotals pmtotals   util1 deigenvalues risk0 risk1 risk2 wrisk1
#> 1     19.811       0        0 489.404        2.923 0.000  1.00     0 61.201
#> 2     14.914       0        0  68.675        2.432 0.188  1.00     1 53.769
#> 3     18.945       0        0 429.562        5.931 0.000  0.97     0 53.845
#>   wrisk2
#> 1  0.000
#> 2 53.769
#> 3  0.000
# }