BW3stagePPS {PracTools} | R Documentation |
Relvariance components for 3-stage sample
Description
Compute components of relvariance for a sample design where primary sampling units (PSUs) are selected with ppswr and secondary sampling units (SSUs) and elements within SSUs are selected via srs. The input is an entire sampling frame.
Usage
BW3stagePPS(X, pp, psuID, ssuID, lonely.SSU = "mean", lonely.TSU = "mean")
Arguments
X |
data vector; length is the number of elements in the population. |
pp |
vector of one-draw probabilities for the PSUs; length is number of PSUs in population. |
psuID |
vector of PSU identification numbers. This vector must be as long as |
ssuID |
vector of SSU identification numbers. This vector must be as long as |
lonely.SSU |
indicator for how singleton SSUs should be handled when computing the within PSU unit relvariance. Allowable values are |
lonely.TSU |
indicator for how singleton third-stage units (TSUs) should be handled when computing the within SSU unit relvariance. Allowable values are |
Details
BW3stagePPS
computes the between and within population relvariance components
appropriate for a three-stage sample in which PSUs are selected with varying probabilities
and with replacement. SSUs and elements within SSUs are selected by simple random sampling.
The components are appropriate for approximating the relvariance of the pwr-estimator of a total
when the same number of SSUs are selected within each PSU, and the same number of elements are
selected within each sample SSU. The function requires that an entire sampling frame of PSUs
and elements be input.
If a PSU contains multiple SSUs, some of which have missing data, or contains only one SSU, a value is imputed. If lonely.SSU = "mean"
, the mean of the non-missing PSU contributions is imputed. If lonely.SSU = "zero"
, a 0 is imputed. The former would be appropriate if a PSU contains multiple SSUs but one or more of them has missing data in which case R will normally calculate an NA. The latter would be appropriate if the PSU contains only one SSU which would be selected with certainty in any sample. lonely.TSU
has a similar purpose for third-stage units.
(Use BW2stagePPSe
if only a sample of PSUs, SSUs, and elements is available.)
Value
List with values:
B |
between PSU unit relvariance |
W |
within PSU unit relvariance computed as if the sample were two-stage |
W2 |
unit relvariance among SSU totals |
W3 |
unit relvariance among elements within PSU/SSUs |
unit relvar |
unit relvariance for population |
k1 |
ratio of |
k2 |
ratio of |
delta1 |
homogeneity measure among elements within PSUs estimated as |
delta2 |
homogeneity measure among elements within SSUs estimated as |
Author(s)
Richard Valliant, Jill A. Dever, Frauke Kreuter
References
Hansen,M.H., Hurwitz,W.N., and Madow,W.G. (1953, chap. 9, p.211). Sample Survey Methods and Theory, Vol.I. John Wiley & Sons.
Saerndal, C.E., Swensson, B., and Wretman, J. (1992, p.149). Model Assisted Survey Sampling. Springer.
Valliant, R., Dever, J., Kreuter, F. (2018, sect. 9.2.4). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. New York: Springer.
See Also
BW2stagePPS
, BW2stagePPSe
, BW2stageSRS
, BW3stagePPSe
Examples
data(MDarea.popA)
MDsub <- MDarea.popA[1:100000,]
M <- length(unique(MDsub$PSU))
# srs/srs/srs design
pp.PSU <- rep(1/M,M)
BW3stagePPS(X=MDsub$y1, pp=pp.PSU, psuID=MDsub$PSU, ssuID=MDsub$SSU,
lonely.SSU = "mean", lonely.TSU = "mean")
# ppswr/srs/srs design
pp.PSU <- table(MDsub$PSU) / nrow(MDsub)
BW3stagePPS(X=MDsub$y1, pp=pp.PSU, psuID=MDsub$PSU, ssuID=MDsub$SSU,
lonely.SSU = "mean", lonely.TSU = "mean")