powered by
Determines sample size by strata using proportional allocation
ssampcalc(df, n, strata, over = 0)
object containing sampling data frame (e.g. data)
sample size (integer) or object containing sample size
variable in sampling data frame by which to stratify (e.g. region)
(optional) desired oversampling proportion (defaults to 0; takes value between 0 and 1 as input)
Returns proportional sample size per strata (rounded up to nearest integer)
[1] Sampling Design & Analysis, S. Lohr, 1999, 4.4
# NOT RUN { ssampcalc(df=albania, n=544, strata=qarku, over=0.05) size <- rsampcalc(nrow(albania), 3, 95, 0.5) ssampcalc(albania, size, qarku) # }
Run the code above in your browser using DataLab