Agriculture Reference
In-Depth Information
X
2
m
b
ʸ
b
a
ʸ
V B ʸ ¼
a ¼1
:
ð
10
:
39
Þ
m
1
Replicate weight methods are much more computationally intensive than the HT
estimator, but are easier to use when calculating statistics other than the mean and the
total.
The R survey package can create replicate weights from a design specified by
svydesign using the function as.svrepdesign. The default method is to
create jackknife weights, but the type option also allows for BRR and bootstrap.
The main advantage of using replicate weights in the survey package is that they
allow us to compare the mean and percentage within subpopulations, computing the
standard errors of the differences (Lumley 2010 ). Note that we are using the
sampling design defined in Sect. 10.2 .
> dsrsjk1 < - as.svrepdesign(dsrs, type¼"JK1")
> esrsjk1 < - svytotal(~yobs, dsrsjk1, deff¼TRUE)
> esrsjk1
total SE DEff
yobs 90516.8 1993.1
1
> set.seed(160964)
> dsrsb < - as.svrepdesign(dsrs, type¼"bootstrap",rep¼200)
> esrsb < - svytotal(~yobs, dsrsb, deff¼TRUE)
> esrsb
total SE DEff
yobs 90516.8 2010.8 1.0178
The advantages of the replicate weight methods become more apparent when we
are estimating a ratio (in this case, yobs2/yobs). See Fig. 10.2 that shows the
histograms of the estimates of a ratio for each bootstrap and jackknife replicate.
> set.seed(160964)
> yobs2 < - yobs*(runif(1000)/2+0.5)
> framepop < - cbind(framepop,yobs2)
> framesrs < - framepop[srs ¼¼ 1,]
> dsrs < - svydesign(id ¼ ~1,data ¼ framesrs,fpc ¼ ~rep(n/N,n))
> qsrs < - svyratio(~yobs2,~yobs,dsrs)
> qsrs
Ratio estimator: svyratio.survey.design2(~yobs2, ~yobs, dsrs)
Ratios¼ yobs
yobs2 0.7522619
SEs¼ yobs
yobs2 0.01212751
Search WWH ::




Custom Search