# NOT RUN {
data(Toxaemia)
tox.tab <- xtabs(Freq~class+smoke+hyper+urea,Toxaemia)
ftable(tox.tab, row.vars=1)
# symptoms by smoking
mosaic(~smoke+hyper+urea, data=tox.tab, shade=TRUE)
# symptoms by social class
mosaic(~class+hyper+urea, data=tox.tab, shade=TRUE)
# predictors
mosaic(~smoke+class, data=tox.tab, shade=TRUE)
# responses
mosaic(~hyper+urea, data=tox.tab, shade=TRUE)
# log odds ratios for urea and hypertension, by class and smoke
# }
# NOT RUN {
LOR <-loddsratio(aperm(tox.tab))
LOR
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab