|
Dear S+/R users:
I’m still conducting analysis using the survey package, to estimate the prevalence & SE of lifetime asthma (ASTHMA2) and current asthma (ASTHNOW) in complex survey design (stratify design).
I have problems estimating the standard errors when the procedures is implemented in a subpopulation of the entire universe.
The procedure goes as follows:
BRFSS.05.svy<-svydesign(ids=~0, strata=~STSTR, weights=~FINALWT, data="">
BRFSS.05.svy<-as.svydesign2(BRFSS.05.svy)
svymean(~ASTHMA2,design=BRFSS.05.svy)
mean SE
ASTHMA21 0.1928144 0.0082
ASTHMA22 0.8061478 0.0082
ASTHMA27 0.0010377 0.0005
; which gives the correct prevalence and standard error estimators.
Then want to calculate the current prevalence, which is a subpopulation of ASTHMA2.
I use the following procedure
Nw.05<-sum(BRFSS.05.F$FINALWT)# the weighted population
AnowPrev<-(svytotal(~ASTHNOW, design=BRFSS.05.svy2, na.rm=TRUE)/Nw.05)*100
> test
total SE
ASTHNOW1 8.792641 15761.4
ASTHNOW2 10.456593 19130.4
ASTHNOW7 0.032211 664.2
Or
subtest.optB<-subset(BRFSS.05.svy2, ASTHNOW==1)
(svytotal(~ASTHNOW, subtest)/Nw.05)*100
Total SE
ASTHNOW1 8.792641 15761.4
ASTHNOW2 10.456593 19130.4
ASTHNOW7 0.032211 664.2
; which gives the correct prevalence but incorrect standard error estimators.
How can I get the correct SE’s?
Thanks in advance
Jose
PS: Bellow are 2 examples of various procedures that I tried that give incorrect results.
> svymean(~ASTHNOW, design=BRFSS.05.svy2)
mean SE
ASTHNOW1 NA NA
ASTHNOW2 NA NA
ASTHNOW7 NA NA
> svymean(~ASTHNOW, design=BRFSS.05.svy2, na.rm=TRUE)
mean SE
ASTHNOW1 0.4560157 0.0231
ASTHNOW2 0.5423138 0.0231
ASTHNOW7 0.0016706 0.0012
Making the world a better place one message at a time. Check out the i’m Talkathon.
|