# the strata
strata=c(1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3)
# sample size in each stratum
nh=c(2,3,3)
# inclusion probabilities for each stratum
pik=inclusionprobastrata(strata,nh)
#check for each stratum
cbind(strata, pik)
Run the code above in your browser using DataLab