Dear all,

I have a example from library survey about estimating in subpopulations and
I need to reproduce it step by step.  This is the example (from paper:
Estimates in subpopulation of Thomas Lumley and just instead of svymean I
used svytotal) that I did in R:

library(survey)

data(fpc)
dfpc<- svydesign(id=~psuid, strata=~stratid, weight=~weight,
data=fpc, nest=TRUE)

dsub<- subset(dfpc, x>4)

svytotal(~x, design=dsub)
  total     SE
x 123.9 33.004
svyby(~x, ~I(x>4), design = dfpc, svytotal)
I(x > 4)     x     se.x
FALSE    FALSE  23.2 17.01764
TRUE      TRUE 123.9 33.00409

and what I can't figure out is which formula or approximation is used for
standard error calculation. I tried with some famouse literature written by
Cohran, Sarndal, Lohr  but I still can't figure out this.
 I would really appreciate if anyone can explain me in few steps formula
which is used to obtain value of 33.00409 for standard error.

Best regards,
Andrija

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to