Learn R Programming

sdcMicro (version 2.0.4)

localSupp: Local Suppression

Description

A simple algorithm to perfom local suppression.

Usage

localSupp(x, keyVar, indivRisk, threshold = 0.15)

Arguments

x
object from class freqCalc
keyVar
Variable on which some values might be suppressed
indivRisk
object from class indivRisk
threshold
threshold for individual risk

Value

  • Manipulated data

Details

Have a look at the link given below.

See Also

freqCalc, indivRisk

Examples

Run this code
## example from Capobianchi, Polettini and Lucarelli:
data(francdat)
f <- freqCalc(francdat, keyVars=c(2,4,5,6),w=8)
f
f$fk
f$Fk
## individual risk calculation:
indivf <- indivRisk(f)  
indivf$rk         
## Local Suppression            
localS <- localSupp(f, keyVar=2, indivRisk=indivf$rk, threshold=0.25)
f2 <- freqCalc(localS$freqCalc, keyVars=c(4,5,6), w=8)
indivf2 <- indivRisk(f2)
indivf2$rk
## select another keyVar and run localSupp once again, if you think the table is not fully protected

Run the code above in your browser using DataLab