powered by
These made-up data illustrate the discrete form (contingency table form) of Simpson's paradox.
data(Clin)
A three-dimensional array of frequencies with:
rows indicating "outcome" (either "death" or "cured"),
columns indicating "male" (either "Yes" or "No"), and
layers indicating "clinic" (either "A" or "B").
# NOT RUN { data(Clin) Clin[1,,] prop.table(Clin[1,,], 2) # }
Run the code above in your browser using DataLab