calibrate
. The
function F
is the link function described in section 2 of
Deville et al. To create a new calibration metric, specify $F-1$ and its
derivative. The package provides cal.linear
, cal.raking
,
and cal.logit
.make.calfun(Fm1, dF, name)
u
and a
vector of length 2, bounds
.Fm1
wrt u
: arguments u
and bounds
"calfun"
Deville J-C, Sarndal C-E (1992) Calibration Estimators in Survey Sampling. JASA 87: 376-382
calibrate
str(cal.linear)
cal.linear$Fm1
cal.linear$dF
hellinger <- make.calfun(Fm1=function(u, bounds) ((1-u/2)^-2)-1,
dF= function(u, bounds) (1-u/2)^-3 ,
name="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))
Run the code above in your browser using DataLab