data("CoalMiners")
ftable(CoalMiners, row.vars = 3)
## Fourfold display, both margins equated
fourfold(CoalMiners[,,2:9], mfcol = c(2,4))
## Fourfold display, strata equated
fourfold(CoalMiners[,,2:9], std = "ind.max", mfcol = c(2,4))
## Log Odds Ratio Plot
summary(l <- oddsratio(CoalMiners[,,2:9]))
age <- seq(25, 60, by = 5)
plot(l,
xlab = "Age Group",
main = "Breathlessness and Wheeze in Coal Miners")
m <- lm(l ~ age + I(age^2))
lines(fitted(m), col = "red", lwd=2)
Run the code above in your browser using DataLab