Agriculture Reference
In-Depth Information
Fig. 10.2 Histograms of the estimates of a ratio for each bootstrap ( left ) and jackknife ( right )
replicate
> dsrsjk1 < - as.svrepdesign(dsrs, type¼"JK1")
> esrsjk1 < - svyratio(~yobs2,~yobs, dsrsjk1)
> esrsjk1
Ratio estimator: svyratio.svyrep.design(~yobs2, ~yobs, dsrsjk1)
Ratios yobs
yobs2 0.7522619
SEs ¼ [,1]
[1,] 0.01211983
> dsrsb < - as.svrepdesign(dsrs, type ¼ "bootstrap",rep ¼ 200)
> esrsb < - svyratio(~yobs2,~yobs, dsrsb)
> esrsb
Ratio estimator: svyratio.svyrep.design(~yobs2, ~yobs, dsrsb)
Ratios ¼ yobs
yobs2 0.7522619
SEs ¼ [,1]
[1,] 0.01197464
Finally, it is sometimes important to display the empirical distribution of the
boostrap and jackknife replicates. The withReplicates function allows for
this. A more sophisticated reason to create replicate weights is that we may need to
perform an analysis that is not available in the survey package. We can imple-
ment the new model by writing code for point estimates, and repeatedly running it
Search WWH ::




Custom Search