powered by
Draws stratifed sample without replacement using proportional allocation
ssamp(df, n, strata, over = 1)
object containing full 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 stratified sample without replacement
# NOT RUN { ssamp(df=albania, n=360, strata=qarku, over=0.1) size <- rsampcalc(nrow(albania), 3, 95, 0.5) stratifiedsample <- ssamp(albania, size, qarku) # }
Run the code above in your browser using DataLab