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
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.