### spineplots
layout(matrix(1:2, ncol = 2))
spineplot(disease ~ smoking, data = alzheimer, subset = gender == "Male",
main = "Male")
spineplot(disease ~ smoking, data = alzheimer, subset = gender == "Female",
main = "Female")
### Cochran-Mantel-Haenszel test
cmh_test(disease ~ smoking | gender, data = alzheimer)
Run the code above in your browser using DataLab