[R] Odds Ratio calculation

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Nov 26 22:21:31 CET 2007



sigalit mangut-leiba wrote:
> Hello,
> I want to calculate Odds Ratio.
> I have a binary outcome and  two groups of exposure: '1' are exposed, and
> '2' are not-exposed.
> I want '2' to be the reference group.
> By "factor" I get group '1' as a reference because it sorted in increasing
> order.
> How do I change it?


See ?factor and learn to use the "levels" argument of factor().

Uwe Ligges



> Thank you,
> Sigalit.
> 
> 	[[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