Learn R Programming

sampler (version 0.2.4)

psampcalc: Determines sample size by strata using sub-units

Description

Determines sample size by strata using sub-units

Usage

psampcalc(df, n, strata, unit, over = 0)

Arguments

df

object containing full sampling data frame (e.g. data)

n

sample size (integer) or object containing sample size

strata

variable in sampling data frame by which to stratify (e.g. region)

unit

variable in sampling data frame containing sub-units (e.g. population)

over

(optional) desired oversampling proportion (defaults to 0; takes value between 0 and 1 as input)

Value

Returns sample size per strata based on sub-units (rounded up to nearest integer)

References

[1] Sampling Design & Analysis, S. Lohr, 1999, 4.4