make.calfun {survey}R Documentation

Calibration metrics

Description

make.calfun() creates objects representing distance functions for calibration of weights. Three such functions are pre-defined.

Usage

make.calfun(Fm1, dF, name)
cal.linear(u, bounds)
cal.raking(u, bounds)
cal.logit(u, bounds)

Arguments

Fm1 Link function minus 1 for calibration factors, function of two arguments: u and bounds
dF Derivative of Fm1 with respect to u
name Character string giving a name for the object
u Linear predictor
bounds c(lower,upper) bounds for calibration factors

Value

For make.calfun, an object of class calfun.

Note

The link function F is the same as F in Table 1 of Deville and Sarndal (1992)

References

Deville J-C, Sarndal C-E. (1992) Calibration Estimators in Survey Sampling. JASA 87:376-382

See Also

calibrate

Examples


hellinger<-make.calfun(function(u, bounds) ((1-u/2)^-2)-1,
                       function(u, bounds) (1-u/2)^{-3},
                       "hellinger distance")
hellinger

data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)

svymean(~api00,calibrate(dclus1, ~api99, pop=c(6194, 3914069),calfun=hellinger))

svymean(~api00,calibrate(dclus1, ~api99, pop=c(6194, 3914069),calfun=cal.linear))

svymean(~api00,calibrate(dclus1, ~api99, pop=c(6194, 3914069),calfun=cal.raking))


[Package survey version 3.6-10 Index]