# NOT RUN {
data(EdgeworthDeaths)
# fit the additive ANOVA model
library(car) # for Anova()
EDmod <- lm(Freq ~ County + year, data=EdgeworthDeaths)
Anova(EDmod)
# now, consider as a two-way table of frequencies
library(vcd)
library(MASS)
structable( ~ County + year, data=EdgeworthDeaths)
loglm( Freq ~ County + year, data=EdgeworthDeaths)
mosaic( ~ County + year, data=EdgeworthDeaths,
shade=TRUE, legend=FALSE, labeling=labeling_values,
gp=shading_Friendly)
# }
Run the code above in your browser using DataLab