strAlloc: Allocate a sample to strata

strAllocR Documentation

Allocate a sample to strata

Description

Compute the proportional, Neyman, cost-constrained, and variance-constrained allocations in a stratified simple random sample.

Usage

strAlloc(n.tot = NULL, Nh = NULL, Sh = NULL, cost = NULL, ch = NULL,
     V0 = NULL, CV0 = NULL, ybarU = NULL, alloc)

Arguments

n.tot

fixed total sample size

Nh

vector of population stratum sizes (N_h) or pop stratum proportions (W_h)

Sh

stratum unit standard deviations (S_h), required unless alloc = "prop"

cost

total variable cost

ch

vector of costs per unit in stratum h (c_h)

V0

fixed variance target for estimated mean

CV0

fixed CV target for estimated mean

ybarU

population mean of y (\bar{y}_U)

alloc

type of allocation; must be one of "prop", "neyman", "totcost", "totvar"

Details

alloc="prop" computes the proportional allocation of a fixed total sample size, n.tot, to the strata. alloc="neyman" computes the allocation of a fixed total sample size, n.tot, to the strata that minimizes the variance of an estimated mean. alloc="totcost" computes the allocation of a fixed total sample size, n.tot, to the strata that minimizes the variance of an estimated mean subject to the fixed total cost. alloc="totvar" computes the allocation that minimizes total cost subject to the target coefficient of variation, CV0, or the target variance, V0, of the estimated mean.

Value

For proportional allocation, a list with values:

alloc

type of allocation: "prop", "neyman", "totcost", "totvar"

Nh

vector of population sizes (N_h) or pop stratum proportions (W_h)

nh

vector of stratum sample sizes

"nh/n"

proportion of sample allocated to each stratum

For other allocations, the three components above plus:

Sh

stratum unit standard deviations (S_h)

"anticipated SE of estimated mean"

Anticipated SE of the estimated mean for the computed allocation

Author(s)

Richard Valliant, Jill A. Dever, Frauke Kreuter

References

Cochran, W.G. (1977). Sampling Techniques. John Wiley & Sons.

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

See Also

nCont, nLogOdds, nProp, nPropMoe, nWilson

Examples

# Neyman allocation
Nh <- c(215, 65, 252, 50, 149, 144)
Sh <- c(26787207, 10645109, 6909676, 11085034, 9817762, 44553355)
strAlloc(n.tot = 100, Nh = Nh, Sh = Sh, alloc = "neyman")

# cost constrained allocation
ch <- c(1400, 200, 300, 600, 450, 1000)
strAlloc(Nh = Nh, Sh = Sh, cost = 100000, ch = ch, alloc = "totcost")

# allocation with CV target of 0.05
strAlloc(Nh = Nh, Sh = Sh, CV0 = 0.05, ch = ch, ybarU = 11664181, alloc = "totvar")

PracTools documentation built on Nov. 9, 2023, 9:06 a.m.