## With one clustering dimension, is close to the with-replacement
## survey estimator, but not identical unless clusters are equal size
data(api)
dclus1r<-svydesign(id=~dnum, weights=~pw, data=apiclus1)
xclus1<-xdesign(id=list(~dnum), weights=~pw, data=apiclus1)
xclus1
svymean(~enroll,dclus1r)
svymean(~enroll,xclus1)
data(salamander)
xsalamander<-xdesign(id=list(~Male, ~Female), data=salamander,
overlap="unbiased")
xsalamander
degf(xsalamander)
Run the code above in your browser using DataLab