Below you see the full data set bcmort
(from the ISwR package). The four-level factor cohort
can be considered the product of two two-level factors:
period
with levels 1991-2001
and 1981-1991
area
with levels Copenhagen
and National
See the details in help(bcmort)
. Create a data frame bcmort2
with those two factors added to the existing variables.
age cohort bc.deaths p.yr 1 50-54 Study gr. 9 64144 2 55-59 Study gr. 34 92734 3 60-64 Study gr. 43 83510 4 65-69 Study gr. 53 87408 5 70-74 Study gr. 56 77427 6 75-79 Study gr. 28 25600 7 50-54 Nat.ctr. 89 767111 8 55-59 Nat.ctr. 434 1067778 9 60-64 Nat.ctr. 516 906943 10 65-69 Nat.ctr. 535 826254 11 70-74 Nat.ctr. 545 635385 12 75-79 Nat.ctr. 214 192946 13 50-54 Hist.ctr. 22 57669 14 55-59 Hist.ctr. 45 113143 15 60-64 Hist.ctr. 82 139065 16 65-69 Hist.ctr. 104 155697 17 70-74 Hist.ctr. 128 128454 18 75-79 Hist.ctr. 57 40196 19 50-54 Hist.nat.ctr. 104 577528 20 55-59 Hist.nat.ctr. 443 931245 21 60-64 Hist.nat.ctr. 485 916923 22 65-69 Hist.nat.ctr. 491 838476 23 70-74 Hist.nat.ctr. 418 608008 24 75-79 Hist.nat.ctr. 182 182824
(from: Dalgaard, 2008, Introductory Statistics with R, Springer)