Re: [R] Reporting odds ratios or risk ratios from GLM

From: Aaron Mackey <amackey_at_virginia.edu>
Date: Tue, 15 Mar 2011 15:04:33 -0400

OR <- exp(coef(GLM.2)[-1])
OR.ci <- exp(confint(GLM.2)[-1,])

-Aaron

On Tue, Mar 15, 2011 at 1:25 PM, lafadnes <ubuntu_at_fadnes.net> wrote:

> I am a new R user (am using it through the Rcmdr package) and have
> struggled
> to find out how to report OR and RR directly when running GLM models (not
> only reporting coefficients.)
>
> Example of the syntax that I have used:
>
> GLM.2 <- glm(diarsev ~ treatmentarm +childage +breastfed,
> family=binomial(logit), data=fieldtrials2)
> summary(GLM.2)
>
> This works well except that I manually have to calculate the OR based on
> the
> coefficients. Can I get these directly (with confidence intervals) by just
> amending the syntax?
>
> Will be grateful for advice!
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Reporting-odds-ratios-or-risk-ratios-from-GLM-tp3357209p3357209.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

        [[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. Received on Tue 15 Mar 2011 - 19:07:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Mar 2011 - 19:10:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive