Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

BW2stagePPS

Relvariance components for 2-stage sample


Description

Compute components of relvariance for a sample design where primary sampling units (PSUs) are selected with probability proportional to size (pps) and elements are selected via simple random sampling (srs). The input is an entire sampling frame.

Usage

BW2stagePPS(X, pp, psuID)

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 X. Each element in a given PSU should have the same value in psuID. PSUs must be in the same order as in X.

Details

BW2stagePPS computes the between and within population relvariance components appropriate for a two-stage sample in which PSUs are selected with varying probabilities and with replacement. Elements within PSUs are selected by simple random sampling. The components are appropriate for approximating the relvariance of the probability-with-replacement (pwr)-estimator of a total when the same number of elements are selected within each sample PSU. The function requires that an entire frame of PSUs and elements be input. (Use BW2stagePPSe if only a sample of PSUs and elements are available.)

Value

List object with values:

B2

between PSU unit relvariance

W2

within PSU unit relvariance

unit relvar

unit relvariance for population

B2+W2

sum of between and within relvariance estimates

k

ratio of B^2 + W^2 to unit relvariance

delta

measure of homogeneity with PSUs estimated as B^2/(B^2 + W^2)

Author(s)

Richard Valliant, Jill A. Dever, Frauke Kreuter

References

Cochran, W.G. (1977, pp.308-310). Sampling Techniques. New York: John Wiley & Sons.

Saerndal, C.E., Swensson, B., and Wretman, J. (1992). Model Assisted Survey Sampling. New York: Springer.

Valliant, R., Dever, J., Kreuter, F. (2013, sect. 9.3.2). Practical Tools for Designing and Weighting Survey Samples. New York: Springer.

See Also

Examples

data(MDarea.pop)
MDsub <- MDarea.pop[1:100000,]
    # Use PSU and SSU variables to define psu's
pp.PSU <- table(MDsub$PSU) / nrow(MDsub)
pp.SSU <- table(MDsub$SSU) / nrow(MDsub)
    # components with psu's defined by the PSU variable
BW2stagePPS(MDsub$y1, pp=pp.PSU, psuID=MDsub$PSU)
    # components with psu's defined by the SSU variable
BW2stagePPS(MDsub$y1, pp=pp.SSU, psuID=MDsub$SSU)

    # Use census tracts and block groups to define psu's
trtBG <- 10*MDsub$TRACT + MDsub$BLKGROUP
pp.trt <- table(MDsub$TRACT) / nrow(MDsub)
pp.BG <- table(trtBG) / nrow(MDsub)
    # components with psu's defined by tracts
BW2stagePPS(MDsub$ins.cov, pp=pp.trt, psuID=MDsub$TRACT)
    # components with psu's defined by block groups
BW2stagePPS(MDsub$ins.cov, pp=pp.BG, psuID=trtBG)

PracTools

Tools for Designing and Weighting Survey Samples

v1.2.2
GPL (>= 2)
Authors
Richard Valliant, Jill A. Dever, Frauke Kreuter
Initial release
2020-07-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.