## S3 method for class 'glm':
odds.ratio(x, level = 0.95, digits = 3, ...)
## S3 method for class 'multinom':
odds.ratio(x, level = 0.95, digits = 3, ...)
## S3 method for class 'factor':
odds.ratio(x, y, level = 0.95, ...)
## S3 method for class 'table':
odds.ratio(x, level = 0.95, ...)
Arguments
x
object from whom odds ratio will be computed
...
further arguments passed to or from other methods
level
the confidence level required
digits
number of decimal to display
y
a second factor object
Value
For glm or multinom objects, returns odds ratios,
their confidence interval and tests if they differ from 1.
For 2x2 table or factor objects, odds.ratio
is a wrapper for fisher.test.
Details
For models calculated with glm, x should have
been calculated with family=binomial.
p-value are the same as summary(x)$coefficients[,4].
Odds ratio could also be obtained with exp(coef(x)) and
confidence intervals with exp(confint(x)).
For models calculated with multinom (nnet),
p-value are calculated according to
http://www.ats.ucla.edu/stat/r/dae/mlogit.htm.