[R] Reporting odds ratios or risk ratios from GLM

David Winsemius dwinsemius at comcast.net
Tue Mar 15 20:09:16 CET 2011


On Mar 15, 2011, at 1:25 PM, lafadnes 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?

Look at predict.glm {stats}. It gives both facilities and the help  
page looks very clear.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list