ssampcalc: Determines sample size by strata using proportional...

Description Usage Arguments Value References Examples

View source: R/ssampcalc.R

Description

Determines sample size by strata using proportional allocation

Usage

1
ssampcalc(df, n, strata, over = 0)

Arguments

df

object containing 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)

over

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

Value

Returns proportional sample size per strata (rounded up to nearest integer)

References

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

Examples

1
2
3
4
ssampcalc(df=albania, n=544, strata=qarku, over=0.05)

size <- rsampcalc(nrow(albania), 3, 95, 0.5)
ssampcalc(albania, size, qarku)

sampler documentation built on Sept. 15, 2019, 5:02 p.m.