eg5.3 <- tibble(
pop = rep(c(1985, 1970), e = 22),
age = rep(rep(1:11, 2), 2),
race = rep(rep(1:2, e = 11), 2),
# number of people in age-race-group
size = c(
3041, 11577, 27450, 32711, 35480, 27411, 19555, 19795, 15254, 8022,
2472, 707, 2692, 6473, 6841, 6547, 4352, 3034, 2540, 1749, 804, 236,
2968, 11484, 34614, 30992, 21983, 20314, 20928, 16897, 11339, 5720,
1315, 535, 2162, 6120, 4781, 3096, 2718, 2363, 1767, 1149, 448, 117
),
# death rate in age-race-group
rate = c(
9.163, 0.462, 0.248, 0.929, 1.084, 1.810, 4.715, 12.187, 27.728, 64.068, 157.570,
17.208, 0.738, 0.328, 1.103, 2.045, 3.724, 8.052, 17.812, 34.128, 68.276, 125.161,
18.469, 0.751, 0.391, 1.146, 1.287, 2.672, 6.636, 15.691, 34.723, 79.763, 176.837,
36.993, 1.352,0.541, 2.040, 3.523, 6.746, 12.967, 24.471, 45.091, 74.902, 123.205
)
)
eg5.3