oddsratio {vcd} | R Documentation |
Computes (log) odds ratios and their asymtotic standard errors for (possibly) stratified data.
oddsratio(x, stratum = NULL, log = TRUE, conf.level = 0.95)
x |
a 2 x 2 x ... table. |
stratum |
vector of strata dimensions. |
log |
if FALSE , ordinary odds ratios are computed |
conf.level |
confidence level used for confidence intervals. |
An object of class logoddratio
, which is simply a
vector of (log) odds ratios with dimensionality depending on stratum
, along with
the following attributes:
ASE |
a vector with the asymptotic standard errors |
lwr, upr |
a vector with lower/upper confidence bounds |
Z |
test statistic for significance tests (only computed for log odds ratios: simply the standardized log odds ratio, which follows an asymptotic normal distribution. |
P |
p-value for this test. |
log |
logical value indicating if log odds ratios or common odds ratios are computed. |
The summary
method prints the standard errors.
David Meyer
david.meyer@ci.tuwien.ac.at
M. Friendly (2000), Visualizing Categorical Data. SAS Institute, Cary, NC.
data(CoalMiners) summary(oddsratio(CoalMiners))