plot.oddsratio {vcd} | R Documentation |
Plots (log) odds ratios, computed by oddsratio
for 2 x 2 x
k-tables, along with confidence intervals.
## S3 method for class 'oddsratio': plot(x, confidence = TRUE, type = "o", ylab = NULL, xlab = "Strata", whiskers = 0.1, ...)
x |
An object of class logoddsratio , computed for a 2 x 2
x k-table. |
confidence |
if TRUE , confidence intervals are plotted for
each data point. |
type |
plot type. |
ylab |
label for the y-axis. The default results in
"Odds Ratio" or "Log Odds Ratio" , as appropriate. |
xlab |
label for the x-axis. |
whiskers |
Width of the confidence interval whiskers. |
... |
Other graphics parameters (see par ). |
David Meyer david.meyer@ci.tuwien.ac.at.
M. Friendly (2000), Visualizing Categorical Data. SAS Institute, Cary, NC.
data(CoalMiners) l <- oddsratio(CoalMiners) g <- seq(25, 60, by = 5) plot(l, xlab = "Age Group", main = "Breathelessness and Wheeze in Coal Miners") m <- lm(l ~ g + I(g^2)) lines(fitted(m), col = "red")