# NOT RUN {
# Load data with psu identifiers and sizes.
data(city)
city2 <- city[, c("track_id", "hh")]
# Load data from a pilot sample.
data(cluster_pilot)
# Calculate sample size and composition.
Calculate2StageSampleSize(psu.ssu = city2,
psu.x = cluster_pilot,
conf.level = 0.95,
error = 0.1,
cost = 4)
# }
Run the code above in your browser using DataLab