Odds Ratio calculation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Odds Ratio calculation

sigalit mangut-leiba-2
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?
Thank you,
Sigalit.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Odds Ratio calculation

Uwe Ligges


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]]
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.