An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130610/4d12a7bf/attachment.pl>
woby2 (Odds Ratio) for variables with 3 or more levels
4 messages · Vlatka Matkovic Puljic, David Winsemius, James C. Whanger +1 more
On Jun 10, 2013, at 9:27 AM, 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.
I hope looking at that again you will see how odd it sounds to be requesting advice about how to use a program for 2 x 2 tables on data that doesn't meet those requirements. If you want to stay within the Epi package world, you can probably use the 'mh' function since it says it can handle multi-way tables (or you can learn to use 'glm' in the regular stats package to do either logistic regression or Poisson regression.)
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.
That is the default set of contrasts for 'glm' (and probably for 'mh' although it's not clear from the help page.) (Epi does have its own mailing list.)
David Winsemius Alameda, CA, USA
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130610/57bf4ae3/attachment.pl>
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