Displaying 1 result from an estimated 1 matches for "dmulti3".
Did you mean:
multi3
2006 Jul 07
2
Multistage Sampling
...you do. Thank you so much. I am struggling with a multistage sampling
design:
library(survey)
multi3 <- data.frame(cluster=c(1,1,1,1 ,2,2,2, 3,3), id=c(1,2,3,4,
1,2,3, 1,2),
nl=c(4,4,4,4, 3,3,3, 2,2), Nl=c(100,100,100,100, 50,50,50, 75,75),
M=rep(23,9),
y=c(23,33,77,25, 35,74,27, 37,72) )
dmulti3 <- svydesign(id=~cluster+id, fpc=~M+Nl, data=multi3)
svymean (~y, dmulti3)
mean SE
y 45.796 5.5483
svytotal(~y, dmulti3)
total SE
y 78999 13643
and I estimate the population total as N=M/m sum(Nl) =
23/3*(100+50+75)=1725. With this, my variance estimator is:
y1<-mean(multi3$y[...