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

BW2stageSRS

Relvariance components for 2-stage sample


Description

Compute components of relvariance for a sample design where primary sampling units (PSUs) and elements are selected via srs. The input is an entire sampling frame.

Usage

BW2stageSRS(X, psuID)

Arguments

X

data vector; length is the number of elements in the 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

BW2stageSRS computes the between and within population relvariance components appropriate for a two-stage sample in which PSUs are selected via srs (either with or without replacement). Elements within PSUs are assumed to be selected by srswor. The same number of elements is assumed to be 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 with values:

B2

between PSU unit relvariance

W2

within PSU unit relvariance

unit relvar

unit relvariance for population

B2+W2

B^2 + W^2

k

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

delta full

intraclass correlation estimated as B^2/(B^2 + W^2)

Author(s)

Richard Valliant, Jill A. Dever, Frauke Kreuter

References

Cochran, W.G. (1977, chap. 11). Sampling Techniques. New York: John Wiley & Sons.

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

See Also

Examples

data(MDarea.pop)
MDsub <- MDarea.pop[1:100000,]
    # psu's are defined by PSU variable
BW2stageSRS(abs(MDsub$Hispanic-2), psuID=MDsub$PSU)
    # psu's are defined by SSU variable
BW2stageSRS(abs(MDsub$Hispanic-2), psuID=MDsub$SSU)

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.