[R] woby2 (Odds Ratio) for variables with 3 or more levels

Michael Friendly friendly at yorku.ca
Tue Jun 11 14:16:21 CEST 2013


You may want loddsratio in the vcdExtra package

On 6/10/2013 12:27 PM, Vlatka Matkovic Puljic wrote:
> Dear all,
>
> I am using Epi package to calculate Odds ratio in my bivariate analysis.
> How can I make *twoby2 *in variables that have 3 or more levels.
>
> For example:
> I have 4 level var (Age)
> m=matrix(c(290, 100,232, 201, 136, 99, 182, 240), nrow=4, ncol=2)
> library (Epi)
> twoby2(m)
>
> R gives me only
> Comparing : Row 1 vs. Row 2
>
> While I would like to have reference value in Row 1, and compare Row 2, Row
> 3 and Row 4 with it.
>
>
> Thanks for your help!
>
> 	[[alternative HTML version deleted]]
>


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



More information about the R-help mailing list