data(hospital)
hospdes<-svydesign(strata=~oblevel, id=~hospno, weights=~weighta,
fpc=~tothosp, data=hospital)
hosprep<-as.svrepdesign(hospdes)
svytotal(~births, design=hospdes)
svytotal(~births, design=hosprep)
Run the code above in your browser using DataLab