From: Mark Hempelmann <neo27_at_t-online.de>

Date: Fri 27 May 2005 - 00:10:41 EST

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

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 27 00:27:51 2005

Date: Fri 27 May 2005 - 00:10:41 EST

## 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 thought the Hansen-Hurwitz estimator per stratum offers the right numbers: p1=5/15, p2=3/12, so y1.total=1/5*(3*118), y2.total=1/3*(4*89) and the stratified estimator with this design should be: 1/27(y1.total+y2.total), obviously wrong. How on earth do I get the numbers Survey is calculating?

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

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 27 00:27:51 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:32:07 EST
*