nPPS {PracTools}R Documentation

Calculate the sample size for a probability proportional to size (PPS) sample

Description

Calculate the sample size for a probability proportional to size (PPS) sample, assuming the sample is selected with replacement.

Usage

nPPS(X = NULL, Y = NULL, CV0 = NULL, V0 = NULL, N = NULL, V1 = NULL, ybarU = NULL)

Arguments

X

variable used for computing 1-draw probabilities; length is N, the population size; must be numeric

Y

variable used for variance calculation; length is N, the population size; must be numeric

CV0

target value of the coefficient of variation of the estimated total of Y

V0

target value of the variance of the estimated total of Y; only one of CV0 and V0 can be specified

N

population size; required if X or Y is NULL

V1

unit variance for PPS calculation

ybarU

population mean of Y (or an estimate of it)

Details

nPPS computes the sample size needed for a probability proportional to size sample or, more generally, a sample selected with varying probabilities, assuming the sample is selected with replacement (WR). Although these samples are rarely selected WR, the variance formula for WR samples is simple and convenient for sample size calculations. Population vectors can be input of X, a measure of size for selecting the sample, and Y, an analysis variable. Alternatively, the population size, N, the unit variance, V1, and the population mean of Y, ybarU can be inputs.

Value

A list with four components:

N

Size of the population

V1

Population variance of Y appropriate for a sample selected with varying probabilities and with replacement; see Valliant, Dever, and Kreuter (2018, sec. 3.4).

ybarU

Population mean of Y

n

Calculated sample size

Author(s)

George Zipf, Richard Valliant

References

Valliant, R., Dever, J., Kreuter, F. (2018, chap. 3). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. New York: Springer.

See Also

nCont, nContMoe, nContOpt, unitVar

Examples

library(PracTools)
data("smho.N874")
y <- smho.N874[,"EXPTOTAL"]
x <- smho.N874[, "BEDS"]
y <- y[x>0]
x <- x[x>0]
nPPS(X = x, Y = y, CV0 = 0.15)
nPPS(X = x, Y = y,  V0 = 2000000^2)
nPPS(CV0 = 0.15, N = length(y), V1 = (10^21), ybarU = mean(y))

[Package PracTools version 1.5 Index]