[R] How to compute 95%CI for OR from logistic regression?
Weidong Gu
anopheles123 at gmail.com
Tue Dec 13 18:02:15 CET 2011
One simple option is to use confint function
exp(confint(result))
Weidong
On Tue, Dec 13, 2011 at 7:16 AM, 孟欣 <lm_mengxin at 163.com> wrote:
> Hi all:
> My data has 3 variables:
> age(3levels : <30y=1 30-50y=2, >50y=3)
> gender(Male=0, Female=1)
> CD4 cell count(raw lab measurement)
> y(1:death 0:alive)
>
> I perform logistic regression to find out the factors that influence y.
>
> result<-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)
>
> >From the result,I can get OR(Odds Ratio) of gender via exp(Estimate of Female, since Male is regarded as reference group and has no result).But how can I compute the 95%CI of OR of gender?
>
>
> Thanks a lot for your help.
>
> My best!
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list