[R-sig-Epi] R Survey Package - Confidence Intervals and Odds ratios

Ashley Splain @@p|@|n1 @end|ng |rom umbc@edu
Thu Mar 3 03:22:05 CET 2022


I hope that this email finds everyone well.  I am a new R user and I am
writing to ask if anyone may be able to provide some statistical expertise:

I am running logistic regression models using the Survey Package in R (my
dataset requires the incorporation of survey weights). The calculation for
the odds ratios and confidence intervals is from the basic stats package.
However, the confidence intervals don't seem to match up with the
significance levels - the confidence intervals suggest something is
significant but the p level is not significant.  For example, b = -0.81, p
= .094, OR = 0.45, CI = 0.26-0.75.

Here is the syntax for the design of the overall analysis and an example of
one model:
nhanesDesigni<-
svydesign(id=~PSU,Strata=~STRA,weights=~WTMEC6YR,nest=TRUE,survey.lonely.psu="adjust",
data=nhanesAnalysis)

actimeR1_i <-
(svyglm(riskaccuracy~AcTime4+Age+Gender+educationR+Race5R+Insuranced+smokingdR+alcdR+Waistc,family="binomial",
design=nhanesDesigni))
summary(actimeR1_i,df=degf(nhanesDesigni))
exp(coef(actimeR1_i))
exp(confint(actimeR1_i))

Would anyone by chance know where I might be going wrong and how to rectify
the code to obtain accurate CIs? I would appreciate any input you can
provide!

Best,
Ashley

	[[alternative HTML version deleted]]



More information about the R-sig-Epi mailing list