While estimating from the survey data involving stratification & clustering survey design and using survey package of r, is it possible to estimate at the cluster level? For eg; for following survey design:

## syntax for stratified cluster sample
dclus=svydesign(id=~dnum, strata=~stype, weights=~pw, data=apistrat, nest=TRUE)

This is an example which is reproduced from the survey package. Here, dnum is district, stype is Elementary/Middle/High School and pw is weight (inverse of probalitlity of the students selected from each of the strata). In this case, can I estimate population parameter at district level? For example, to estimate total enrollment for each of the district:

svyby(~enroll,~dnum, design=dclus, svytotal)

I got the following output:

dnum   enroll       se
 19   21751.32   21751.32
 20   10494.50   10494.50
 25    9416.73    9416.73
 27   26923.30   26923.30
 40   14843.30   14843.30
 41   25774.43   25774.43

I believe this estimation is not correct, as no where I have given the break up of total students at district level (cluster level). Any help would be greatly appreciated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.