# [R] Survey and Stratification

From: Mark Hempelmann <neo27_at_t-online.de>
Date: Fri 27 May 2005 - 00:10:41 EST

Working through sampling theory, I tried to comprehend the concept of stratification and apply it with Survey to a small example. My question is more of theoretic nature, so I apologize if this does not fully fit this board's intention, but I have come to a complete stop in my efforts and need an expert to help me along. Please help:

## create survey design object

age.des1<-svydesign(ids=~id, strata=~stratum, weight=~Nh, data=age)
svymean(~y, age.des1)
## gives mean 25.568, SE 0.9257

age.des2<-svydesign(ids=~id, strata=~stratum, weight=~I(nh/Nh), data=age) svymean(~y, age.des2)
## gives mean 25.483, SE 0.9227

age.des3<-svydesign(ids=~id, strata=~stratum, weight=~weight, data=age) svymean(~y, age.des3)
## gives mean 26.296, SE 0.9862

age.des4<-svydesign(ids=~id, strata=~stratum, data=age) svymean(~y, age.des4)
## gives mean 25.875, SE 0.9437

Basically, I thought the option weight=~Nh as well as weight=~I(nh/Nh) would result in the same number, but it does not. I am reading Thompson(02), Cochran(77) and of course Lumley on his Survey package, but I can't find my mistake.

I am very sorry to bother you with this problem, however, I didn't find anybody who was willing to help me.

Thank you so much
Mark

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