sdcMicro (version 4.1.0)

LLmodGlobalRisk: Global risk using log-linear models.

Description

The sample frequencies are assumed to be independent and following a Poisson distribution. The parameters of the corresponding parameters are estimated by a log-linear model including the main effects and possible interactions.

Usage

LLmodGlobalRisk(obj, method = "IPF", inclProb = NULL, form = NULL, modOutput = FALSE)

Arguments

obj
An object of class sdcMicroObj or a numeric matrix or data frame containing the categorical key variables.
method
At this time, only iterative proportional fitting (IPF) can be used.
inclProb
Inclusion probabilites (experimental)
form
A formula specifying the model.
modOutput
if TRUE, additional output is given.

Value

  • Two global risk measures or the modified risk in the sdcMicroObj object.

Details

The iterative proportional fitting method is used to fit the parameters of the Poisson distribution related to the model specified. These parameters are used to estimate a global risk, defined in Skinner and Holmes (1998).

References

CJ. Skinner and DJ. Holmes. Estimating the re-identification risk per record in microdata. Journal of Official Statistics, 14:361-372, 1998.

See Also

loglm, measure_risk

Examples

Run this code
data(testdata2)
x <- testdata2[,c("sex","water","roof")]
res <- LLmodGlobalRisk(x, form=~sex+water+roof, 
           inclProb=1/testdata2[,"sampling_weight"])
res$gr1; res$gr2

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

Run the code above in your browser using DataLab