# [R] Survey - Cluster Sampling

From: Mark Hempelmann <neo27_at_t-online.de>
Date: Thu 16 Jun 2005 - 22:56:35 EST

I am struggling to compute correctly a cluster sampling design. I want to do one stage clustering with different parametric changes:

Let M be the total number of clusters in the population, and m the number sampled. Let N be the total of elements in the population and n the number sampled. y are the values sampled. This is my example data:

clus1 <- data.frame(cluster=c(1,1,1,2,2,2,3,3,3), id=seq(1:3,3), weight=rep(72/9,9), nl=rep(3,9), Nl=rep(3,9), N=rep(72,9), y=c(23,33,77, 25,35,74, 27,37,72) )

1. Let M=m=3 and N=n=9. Then:

dclus1<-svydesign(id=~cluster, data=clus1) svymean(~y, dclus1)

mean SE
y 44.778 0.294, the unweighted mean, assuming equal probability in the clusters. ok.

dclus2<-svydesign(id=~cluster, data=clus1, fpc=~N) svymean(~y, dclus2)

dclus3<-svydesign(id=~cluster, weights=~weight, data=clus1, fpc=~N) svymean(~y, dclus3)

mean SE
y 44.778 0.2878, still exactly the same numbers, although I provided the
weights. What am I doing wrong?

I am sorry to bother you. Studying Statistics isn't done in a day, that's for sure. Thank you so much for your understanding and support.

mark

R-help@stat.math.ethz.ch mailing list