Main page: https://www.rdocumentation.org/packages/datasets/versions/3.6.2/topics/VADeaths
VADeaths
## Rural Male Rural Female Urban Male Urban Female
## 50-54 11.7 8.7 15.4 8.4
## 55-59 18.1 11.7 24.3 13.6
## 60-64 26.9 20.3 37.0 19.3
## 65-69 41.0 30.9 54.6 35.1
## 70-74 66.0 54.3 71.1 50.0
require(stats); require(graphics)
n <- length(dr <- c(VADeaths))
nam <- names(VADeaths)
d.VAD <- data.frame(
Drate = dr,
age = rep(ordered(rownames(VADeaths)), length.out = n),
gender = gl(2, 5, n, labels = c("M", "F")),
site = gl(2, 10, labels = c("rural", "urban")))
coplot(Drate ~ as.numeric(age) | gender * site, data = d.VAD,
panel = panel.smooth, xlab = "VADeaths data - Given: gender")
summary(aov.VAD <- aov(Drate ~ .^2, data = d.VAD))
## Df Sum Sq Mean Sq F value Pr(>F)
## age 4 6288 1572.1 590.858 8.55e-06 ***
## gender 1 648 647.5 243.361 9.86e-05 ***
## site 1 77 76.8 28.876 0.00579 **
## age:gender 4 86 21.6 8.100 0.03358 *
## age:site 4 43 10.6 3.996 0.10414
## gender:site 1 73 73.0 27.422 0.00636 **
## Residuals 4 11 2.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0))
plot(aov.VAD)
par(opar)