# Load data with PSU identifiers and sizes.
data(psu.ssu)
# Take a sample of 10 PSU, with probability
# proportional to size and with replacement.
selected.psu <- SamplePPS(psu.ssu, 10, write = FALSE)
# Take a systematic sampling of 5 SSU within each
# PSU of selected.psu.
SampleSystematic(selected.psu, 5, write = FALSE)
# Simple systematic sampling
SampleSystematic(su = 5, N = 100)
# Stratified systematic sampling
SampleSystematic(su = c('Urban' = 50, 'Rural' = 10),
N = c('Urban' = 4000, 'Rural' = 150))
Run the code above in your browser using DataLab