Excess mortality

Final outputs for paper and appendix

Result files

Primary results from age adjusted models

results_month <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_month.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_month.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_month.Rds")
)) %>% 
  filter(Model == "Age Serfling (Stan, NB)") %>% 
  mutate(Date = anytime::anydate(paste0(Year, "-", Month))) %>% 
  arrange(Country, Year, Month) %>% 
  relocate(c(n_eff, Rhat), .after = last_col()) %>% 
  mutate(across(pred_total_deaths:excess_month_upper, round)) %>% 
  relocate(Model, Pandemic, Country, Year, Month, Date)

results_year <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_year.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_year.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_year.Rds") 
)) %>% 
  filter(Model == "Age Serfling (Stan, NB)") %>% 
  arrange(Country, Year) %>% 
  mutate(across(yearly_pred_total_deaths:yearly_excess_total_deaths_upper, round)) %>% 
  relocate(Model, Pandemic)

results_age <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_age.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_age.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_age.Rds") 
)) %>% 
  filter(Model == "Age Serfling (Stan, NB)") %>% 
  arrange(Country, Year) %>% 
  mutate(across(pred_grouped_deaths:excess_grouped_lifelost70_upper, round)) %>% 
  relocate(Model, Pandemic, Country, Year, Age_cat, Deaths)

Sensitivity analysis using Bayesian NB model, unadjusted models

results_year_global <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_year.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_year.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_year.Rds") 
)) %>% 
  filter(Model == "Global Serfling (Stan, NB)") %>% 
  arrange(Country, Year) %>% 
  mutate(across(yearly_pred_total_deaths:yearly_excess_total_deaths_upper, round)) %>% 
  relocate(Model, Pandemic)

Sensitivity analysis using frequentist Poisson model, unadjusted for age

results_month_boot <- read_rds("data/outputs_2021-11-18/All_results_month.Rds") %>% 
  mutate(Date = anytime::anydate(paste0(Year, "-", Month))) %>% 
  arrange(Country, Year, Month) %>% 
  mutate(across(pred:excess_month_lower, round)) %>% 
  mutate(Model = "Global Serfling (bootstrap)") %>% 
  relocate(Model, Country, Year, Month, Date)

Sensitivity analysis using alternative longer (7 days) time window

results_year_last_7_notrim <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-12-01/Sweden_results_year_last_7_notrim.Rds"),
  read_rds("data/outputs_2021-12-01/Spain_results_year_last_7_notrim.Rds"),
  read_rds("data/outputs_2021-12-01/Switzerland_results_year_last_7_notrim.Rds")
)) %>% 
  filter(Model == "Age Serfling (Stan, NB, last 7 no trim)") %>% 
  arrange(Country, Year) %>% 
  mutate(across(yearly_pred_total_deaths:yearly_excess_total_deaths_upper, round)) %>% 
  relocate(Model, Pandemic)

Sensitivity analysis using alternative time window & min/max selection

results_year_last_7_trim <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_year_last_7_trim.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_year_last_7_trim.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_year_last_7_trim.Rds")
)) %>% 
  filter(Model == "Age Serfling (Stan, NB, last 7)") %>% 
  arrange(Country, Year) %>% 
  mutate(across(yearly_pred_total_deaths:yearly_excess_total_deaths_upper, round)) %>% 
  relocate(Model, Pandemic)

Sensitivity analysis for including effects of pandemics

results_month_pand <- merge_mort(bind_rows(
  read_rds("data/outputs_2021-11-23/Sweden_results_month_pand.Rds"),
  read_rds("data/outputs_2021-11-24/Spain_results_month_pand.Rds"),
  read_rds("data/outputs_2021-11-23/Switzerland_results_month_pand.Rds")
)) %>% 
  filter(Model == "Age Serfling (Stan, NB, pandemic)") %>%
  mutate(Date = anytime::anydate(paste0(Year, "-", Month))) %>% 
  relocate(c(n_eff, Rhat), .after = last_col()) %>% 
  arrange(Country, Year, Month) %>% 
  mutate(across(pred_total_deaths:excess_month_upper, round)) %>% 
  relocate(Model, Pandemic, Country, Year, Month, Date)

Population

pops <- read_rds("data/deaths_monthly.Rds") %>% 
  filter(Month == 1) %>% 
  select(Year, Country, Population_obs) %>% 
  rename(Population = Population_obs)

COVID-19 cases

covid_cases_deaths_jh <- read_rds("data/covid_cases_deaths_jh.Rds")

Yearly deaths by age

deaths_yearly_age_sex <- read_rds("data/deaths_yearly_age_sex.Rds")

Paper outputs

Table 1

Characteristics of the 4 Deadliest Pandemics of the Past 140 Years in Switzerland, Sweden, and Spain, by Calendar Year.

Calendar Year and Country
Population, n
Deaths From All Causes, n
COVID-19 Deaths, n\(^*\)
Count Expected Count\(^†\)
1890
Switzerland 2 949 868 61 805 55 700 to 61 100 –
Sweden 4 775 819 81 824 69 300 to 77 000 –
1918
Switzerland 3 878 360 75 034 47 600 to 53 100 –
Sweden 5 802 022 104 591 73 500 to 84 000 –
Spain 21 300 235 695 758 429 700 to 480 000 –
1957
Switzerland 5 097 745 51 066 49 300 to 54 700 –
Sweden 7 341 017 73 132 67 800 to 73 000 –
Spain 29 445 865 293 502 264 700 to 296 200 –
2020
Switzerland 8 605 965 76 195 64 700 to 70 900 7 873
Sweden 10 327 496 97 870 86 900 to 93 700 8 727
Spain 47 332 613 492 930 400 500 to 441 000 50 837
2021\(^‡\)
Switzerland 8 670 302 34 619 33 700 to 37 700 2 900
Sweden 10 379 295 – – 5 903
Spain 47 394 223 234 994 210 300 to 238 400 30 046
* Data are from the Johns Hopkins Coronavirus Resource Center
† Model-predicted number of deaths due to all causes from the 5 preceding years (95% credible interval, rounded to the next 100).
‡ Only the first 6 months of the year were included in the analyses. No age-specific data were available from Sweden for this period.

Table 2

Model-Based Estimates of Absolute Excess Deaths, Absolute Excess Deaths Scaled by Population, Relative Excess Deaths (Compared With Expected Number of Deaths), and Number of Life-Years Lost Until Age 70 Years.

Calendar Year and Country
Absolute Excess Deaths per
100 000 Persons
Absolute excess deaths
per population\(^*\)
Relative Excess Deaths\(^†\)
n 95% CrI n 95% CrI % 95% CrI
1890
Switzerland 3 456 (703 to 6 118) 115 (25 to 205) 6.0 (1.2 to 11.0)
Sweden 8 810 (4 871 to 12 573) 185 (100 to 265) 12.1 (6.3 to 18.2)
1918
Switzerland 24 730 (21 925 to 27 453) 640 (565 to 710) 49.3 (41.3 to 57.7)
Sweden 25 937 (20 597 to 31 087) 445 (355 to 535) 33.1 (24.5 to 42.3)
Spain 241 661 (215 791 to 266 103) 1 135 (1 015 to 1 250) 53.3 (45.0 to 61.9)
1957
Switzerland -922 (-3 679 to 1 804) -20 (-70 to 35) -1.7 (-6.7 to 3.7)
Sweden 2 760 (101 to 5 338) 40 (0 to 75) 4.0 (0.1 to 7.9)
Spain 13 227 (-2 659 to 28 783) 45 (-10 to 100) 4.8 (-0.9 to 10.9)
2020
Switzerland 8 429 (5 253 to 11 449) 100 (60 to 135) 12.5 (7.4 to 17.7)\(^§\)
Sweden 7 656 (4 199 to 10 984) 75 (40 to 105) 8.5 (4.5 to 12.6)\(^§\)
Spain 72 328 (51 942 to 92 409) 155 (110 to 195) 17.3 (11.8 to 23.1)\(^§\)
2021
Switzerland -1 002 (-3 087 to 957) -10 (-35 to 10) -2.7 (-8.2 to 2.8)
Spain 10 867 (-3 423 to 24 715) 25 (-5 to 50) 5.0 (-1.4 to 11.8)
* Absolute number of excess deaths scaled by country population.
† Absolute number of excess deaths scaled by the number of expected deaths.
‡ Sum of life years lost until the age of 70 in thousands.
§ Based on 8000 posterior samples, the probability that the relative number of deaths in 2020 was larger than in 1957 is 100% for Switzerland, 94.3% for Sweden, and 99.9% for Spain.

Figure 1

Yearly excess per population.

Note: the scales of Y axes vary by country!

Figure 2

Zooming to pandemics to explore absolute excess with CrI.

Figure 3

Age differences across major pandemics (per population).

Note: Excludes category [90,120] in pandemic years 1890 & 1918 due to small number of deaths in these age groups resulting in very large CrI.

Appendix

Table S1

Comparing main estimates (Age Serfling (Stan, NB)) of excess from alternative methods:

  • Global Serfling (bootstrap)
  • Global Serfling (Stan, NB)
  • Age Serfling with alternative 7 day time window and min/max trim (Stan, NB)
  • Age Serfling with alternative 7 day time window and no trim (Stan, NB)
pandemic_years <- c(1890, 1918, 1957, 2020, 2021)

table_s1 <- 
  
  bind_rows(
    
    # baseline, ie. reported in paper `Age Serfling (Stan, NB)`
    results_year  %>% 
      mutate(Model = "m0") %>% 
      select(Model, Country, Year,
             starts_with("yearly_excess_total_deaths")),
    
    # Global Serfling (bootstrap)
    # simply summed from monthly values to obtain year
    # !without CI for yearly!
    results_month_boot %>% 
      mutate(excess = Deaths - pred) %>% 
      group_by(Model, Country, Year) %>% 
      summarise(yearly_excess_total_deaths = sum(excess)) %>% 
      ungroup() %>% 
      mutate(Model = "m1"),
    
    # Global Serfling (Stan, NB) without age
    results_year_global  %>% 
      mutate(Model = "m2") %>% 
      select(Model, Country, Year,
             starts_with("yearly_excess_total_deaths")),
    
    # Age Serfling with alternative time window & min/max trim (Stan, NB)
    results_year_last_7_notrim  %>% 
      mutate(Model = "m3") %>% 
      select(Model, Country, Year,
             starts_with("yearly_excess_total_deaths")),
    
    # Age Serfling with alternative time window (Stan, NB)
    results_year_last_7_trim  %>% 
      mutate(Model = "m4") %>% 
      select(Model, Country, Year,
             starts_with("yearly_excess_total_deaths"))
    
  ) %>% 
  filter(Year %in% c(pandemic_years, pandemic_years - 1, pandemic_years + 1)) %>% 
  arrange(desc(Country), Year, Model) %>% 
  pivot_wider(names_from = Model, 
              values_from = starts_with("yearly_excess"),
              names_sort = FALSE) %>% 
  relocate(Country, Year,
           yearly_excess_total_deaths_m0, 
           yearly_excess_total_deaths_lower_m0, 
           yearly_excess_total_deaths_upper_m0,
           yearly_excess_total_deaths_m1, 
           yearly_excess_total_deaths_lower_m1, 
           yearly_excess_total_deaths_upper_m1,
           yearly_excess_total_deaths_m2, 
           yearly_excess_total_deaths_lower_m2, 
           yearly_excess_total_deaths_upper_m2,
           yearly_excess_total_deaths_m3, 
           yearly_excess_total_deaths_lower_m3, 
           yearly_excess_total_deaths_upper_m3,
           yearly_excess_total_deaths_m4, 
           yearly_excess_total_deaths_lower_m4, 
           yearly_excess_total_deaths_upper_m4
  ) %>% 
  select(-yearly_excess_total_deaths_lower_m1, -yearly_excess_total_deaths_upper_m1) %>% 
  
  mutate(
    yearly_excess_total_deaths_m0 = number(yearly_excess_total_deaths_m0, 
                                           accuracy = 5L, big.mark = " "), 
    yearly_excess_total_deaths_m1 = number(yearly_excess_total_deaths_m1, 
                                           accuracy = 5L, big.mark = " "),
    yearly_excess_total_deaths_m2 = number(yearly_excess_total_deaths_m2, 
                                           accuracy = 5L, big.mark = " "),
    yearly_excess_total_deaths_m3 = number(yearly_excess_total_deaths_m3, 
                                           accuracy = 5L, big.mark = " "),
    yearly_excess_total_deaths_m4 = number(yearly_excess_total_deaths_m4, 
                                           accuracy = 5L, big.mark = " ")
  ) %>% 
  
  mutate(
    yearly_excess_total_deaths_m0_cri = str_c("(",
                                              number(yearly_excess_total_deaths_lower_m0,
                                                     accuracy = 5L, big.mark = " "), 
                                              " to ",
                                              number(yearly_excess_total_deaths_upper_m0,
                                                     accuracy = 5L, big.mark = " "), 
                                              ")")
  ) %>% 
  relocate(yearly_excess_total_deaths_m0_cri, 
           .after = yearly_excess_total_deaths_m0) %>% 
  select(-yearly_excess_total_deaths_lower_m0,
         -yearly_excess_total_deaths_upper_m0) %>% 
  
  mutate(
    yearly_excess_total_deaths_m2_cri = str_c("(",
                                              number(yearly_excess_total_deaths_lower_m2,
                                                     accuracy = 5L, big.mark = " "), 
                                              " to ",
                                              number(yearly_excess_total_deaths_upper_m2,
                                                     accuracy = 5L, big.mark = " "), 
                                              ")")
  ) %>% 
  relocate(yearly_excess_total_deaths_m2_cri, 
           .after = yearly_excess_total_deaths_m2) %>% 
  select(-yearly_excess_total_deaths_lower_m2,
         -yearly_excess_total_deaths_upper_m2) %>% 
  
  mutate(
    yearly_excess_total_deaths_m3_cri = str_c("(",
                                              number(yearly_excess_total_deaths_lower_m3,
                                                     accuracy = 5L, big.mark = " "), 
                                              " to ",
                                              number(yearly_excess_total_deaths_upper_m3,
                                                     accuracy = 5L, big.mark = " "), 
                                              ")")
  ) %>% 
  relocate(yearly_excess_total_deaths_m3_cri, .after = yearly_excess_total_deaths_m3) %>% 
  select(-yearly_excess_total_deaths_lower_m3, -yearly_excess_total_deaths_upper_m3) %>% 
  
  mutate(
    yearly_excess_total_deaths_m4_cri = str_c("(", 
                                              number(yearly_excess_total_deaths_lower_m4,
                                                     accuracy = 5L, big.mark = " "), 
                                              " to ",
                                              number(yearly_excess_total_deaths_upper_m4,
                                                     accuracy = 5L, big.mark = " "), 
                                              ")")
  ) %>% 
  relocate(yearly_excess_total_deaths_m4_cri, .after = yearly_excess_total_deaths_m4) %>% 
  select(-yearly_excess_total_deaths_lower_m4, -yearly_excess_total_deaths_upper_m4) %>% 
  
  mutate(across(yearly_excess_total_deaths_m0:yearly_excess_total_deaths_m4_cri, 
                ~replace(., is.na(.), "--")))
Baseline
Sensitivity 1\(^*\)
Sensitivity 2\(^†\)
Sensitivity 3\(^‡\)
Sensitivity 4\(^§\)
Country, Year Excess 95% CrI Excess Excess 95% CrI Excess 95% CrI Excess 95% CrI
Switzerland
1889 1 380 (-1 550 to 4 255) 1 100 1 300 (-1 650 to 4 130) 1 680 (-865 to 4 190) -410 (-3 405 to 2 510)
1890 3 455 (705 to 6 120) 3 380 3 360 (605 to 6 015) 2 395 (-310 to 5 020) 1 790 (-1 110 to 4 565)
1891 1 920 (-1 265 to 5 010) 1 975 1 585 (-1 605 to 4 520) 1 950 (-825 to 4 670) 990 (-2 140 to 4 045)
1917 3 810 (1 155 to 6 395) 3 630 3 855 (1 175 to 6 505) 4 035 (1 240 to 6 670) 1 905 (-925 to 4 630)
1918 24 730 (21 925 to 27 455) 24 460 24 625 (21 690 to 27 465) 25 725 (22 845 to 28 480) 23 705 (20 540 to 26 705)
1919 3 730 (510 to 6 835) 3 820 3 700 (515 to 6 790) 4 600 (1 895 to 7 275) 3 455 (200 to 6 540)
1956 1 535 (-775 to 3 750) 1 555 1 470 (-865 to 3 725) 1 695 (-505 to 3 905) 1 555 (-630 to 3 710)
1957 -920 (-3 680 to 1 805) -1 200 -1 035 (-3 835 to 1 675) -180 (-2 650 to 2 250) -25 (-2 440 to 2 295)
1958 -3 705 (-6 950 to -605) -3 360 -3 190 (-6 315 to -185) -2 980 (-5 535 to -475) -2 760 (-5 095 to -380)
2019 165 (-3 210 to 3 400) 280 320 (-2 950 to 3 460) 395 (-2 200 to 2 895) 600 (-1 865 to 2 975)
2020 8 430 (5 255 to 11 450) 8 810 8 685 (5 575 to 11 675) 8 105 (5 505 to 10 630) 7 360 (4 395 to 10 240)
2021 -1 000 (-3 085 to 955) -845 -715 (-2 735 to 1 220) -795 (-2 715 to 1 010) -925 (-3 280 to 1 375)
Sweden
1889 2 495 (-1 400 to 6 155) 2 785 2 540 (-1 280 to 6 290) 290 (-3 385 to 3 790) -1 125 (-5 425 to 2 960)
1890 8 810 (4 870 to 12 575) 8 720 8 525 (4 475 to 12 495) 7 380 (3 750 to 10 945) 7 060 (2 930 to 11 055)
1891 5 295 (800 to 9 480) 6 365 5 570 (1 045 to 9 800) 6 515 (2 655 to 10 245) 5 875 (1 405 to 10 255)
1917 -2 640 (-7 970 to 2 330) -2 980 -2 865 (-8 140 to 2 105) -2 945 (-7 240 to 1 245) -645 (-4 165 to 2 725)
1918 25 935 (20 595 to 31 085) 25 505 25 695 (20 310 to 30 885) 25 735 (21 420 to 29 845) 27 700 (23 945 to 31 250)
1919 7 245 (1 180 to 12 965) 8 260 7 140 (1 020 to 12 835) 5 875 (1 265 to 10 350) 7 395 (3 625 to 11 080)
1956 1 080 (-2 395 to 4 445) 1 585 1 450 (-2 085 to 4 910) 1 050 (-1 825 to 3 820) 880 (-2 410 to 4 065)
1957 2 760 (100 to 5 340) 3 040 2 990 (395 to 5 515) 3 325 (410 to 6 220) 3 135 (-470 to 6 575)
1958 -360 (-3 505 to 2 720) 1 040 620 (-2 465 to 3 605) -315 (-3 565 to 2 800) -800 (-4 875 to 3 060)
2019 -4 365 (-8 015 to -795) -4 390 -4 255 (-7 810 to -730) -3 350 (-6 330 to -345) -4 380 (-7 125 to -1 695)
2020 7 655 (4 200 to 10 985) 8 465 8 405 (4 960 to 11 690) 6 760 (3 635 to 9 910) 2 600 (-690 to 5 750)
2021 – – 1 700 750 (-1 845 to 3 160) – – – –
Spain
1917 11 645 (-13 875 to 36 180) 12 155 12 020 (-13 400 to 36 025) 22 060 (-900 to 44 430) 20 950 (1 005 to 40 565)
1918 241 660 (215 790 to 266 105) 239 680 239 495 (214 035 to 264 175) 243 240 (218 610 to 266 700) 241 660 (215 790 to 266 105)
1919 28 835 (1 100 to 55 560) 23 340 22 835 (-4 940 to 49 265) 24 670 (-165 to 48 125) 45 235 (21 520 to 67 910)
1956 32 305 (9 145 to 53 685) 39 455 33 085 (10 205 to 54 805) 33 355 (14 275 to 51 825) 30 730 (15 545 to 45 480)
1957 13 225 (-2 660 to 28 785) 10 715 11 675 (-4 495 to 27 310) 28 360 (7 820 to 48 025) 21 360 (4 365 to 37 570)
1958 -28 160 (-47 480 to -9 435) -32 630 -28 615 (-48 745 to -9 615) -11 425 (-33 630 to 9 845) -27 265 (-44 020 to -10 910)
2019 -13 370 (-34 800 to 7 185) -20 505 -19 885 (-41 320 to 1 025) -8 505 (-26 810 to 9 205) -10 460 (-31 415 to 9 695)
2020 72 330 (51 940 to 92 410) 65 960 65 495 (44 510 to 85 625) 65 045 (47 040 to 81 970) 69 225 (47 980 to 89 670)
2021 10 865 (-3 425 to 24 715) 10 110 10 980 (-3 525 to 24 785) 9 350 (-3 005 to 21 775) 14 245 (-265 to 28 120)
* Serfling, Poisson, unadjusted for age
† Serfling, NB, unadjusted for age
‡ Serfling, NB, age adjusted, alternative time window, no trim
§ Serfling, NB, age adjusted, alternative time window, trim

Figure S1

Yearly estimates of excess

Absolute

Percentage

Figure S2

Monthly estimates of excess

Absolute

Relative

Percentage

Figure S3

Zooming to pandemics to explore excess

Absolute

Percentage

Figure S4

Age differences across major pandemics - with %s

Figure S5

Different age profiles of excess deaths across two pandemics and three countries.

Percentage

Per population

Figure S6

Impact of extremes: using 1918 pandemic as an example of impact on estimates from 1919 - 1923.
Estimates with extreme year (blue) and without (red).
Converge after 5 year smoothing window stops having effect (ie. in 1924).

Figure 1918-1925

Table 1919

Using 1918 pandemic as an example of impact on estimates from 1919.

Including 1918
Excluding 1918
Country Month Observed Predicted Difference Predicted (pandemic) Difference
Switzerland 1 5599 4919 680 6620 -1021
Switzerland 2 5324 5280 44 6556 -1232
Switzerland 3 5404 5298 106 6473 -1069
Switzerland 4 5451 4961 490 6264 -813
Switzerland 5 4976 4452 524 5820 -844
Switzerland 6 4166 3961 205 5279 -1113
Switzerland 7 3851 3616 235 4874 -1023
Switzerland 8 3674 3432 242 4817 -1143
Switzerland 9 3370 3419 -49 5150 -1780
Switzerland 10 4043 3573 470 5724 -1681
Switzerland 11 4465 3902 563 6271 -1806
Switzerland 12 4609 4388 221 6521 -1912
Sweden 1 10999 7345 3654 8851 2148
Sweden 2 8289 7419 870 8345 -56
Sweden 3 7781 7304 477 8241 -460
Sweden 4 8076 7121 955 8447 -371
Sweden 5 7137 6831 306 8121 -984
Sweden 6 5647 6366 -719 7281 -1634
Sweden 7 5590 5765 -175 6556 -966
Sweden 8 5093 5284 -191 6430 -1337
Sweden 9 5083 5151 -68 7144 -2061
Sweden 10 6120 5457 663 8444 -2324
Sweden 11 7289 6136 1153 9507 -2218
Sweden 12 7185 6868 317 9556 -2371
Spain 1 45826 40915 4911 51913 -6087
Spain 2 39277 41051 -1774 49383 -10106
Spain 3 44287 38664 5623 48839 -4552
Spain 4 38960 35772 3188 47987 -9027
Spain 5 37423 34648 2775 46131 -8708
Spain 6 36609 35812 797 45273 -8664
Spain 7 41756 37937 3819 47431 -5675
Spain 8 40557 38919 1638 52720 -12163
Spain 9 37199 38078 -879 59338 -22139
Spain 10 37952 36684 1268 62967 -25015
Spain 11 37904 36756 1148 61072 -23168
Spain 12 45002 38682 6320 56021 -11019

Figure 2020-21

Table 2021

Using 2021 pandemic as an example of impact on estimates from 2020

Including 1918
Excluding 1918
Country Month Observed Predicted Difference Predicted (pandemic) Difference
Switzerland 1 7851 6572 1279 7063 788
Switzerland 2 5434 6455 -1021 6755 -1321
Switzerland 3 5592 6088 -496 6349 -757
Switzerland 4 5349 5689 -340 6041 -692
Switzerland 5 5373 5444 -71 5822 -449
Switzerland 6 5020 5372 -352 5648 -628
Spain 1 52975 42866 10109 46074 6901
Spain 2 41400 41513 -113 46404 -5004
Spain 3 37467 37822 -355 44284 -6817
Spain 4 35262 34777 485 40989 -5727
Spain 5 34825 33561 1264 38344 -3519
Spain 6 33065 33587 -522 36596 -3531

Pandemic compared to last year

2021 not included yet since not a full year!

Absolute

Relative

Comparing to BfS estimates

Data from BfS prepared in 03. No CI included in comparisons since different age groups are used!

Year Excess_BfS Excess_modelled Difference
2010 696 264 -432
2011 -672 -1640 -968
2012 1436 452 -984
2013 964 373 -591
2014 -1528 -1297 231
2015 2463 2399 -64
2016 -1994 -2517 -523
2017 166 494 328
2018 -76 122 198
2019 539 163 -376
2020 7950 8429 479
2021 -130 -1002 -872

Model diagnostics

Rhat

Check that all values <1.1

summary(results_month[results_month$Model != "Global Serfling", ]$Rhat) 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.9996  1.0000  1.0002  1.0002  1.0004  1.0017 

ESS

Check that all effective sample sizes are large

summary(results_month[results_month$Model != "Global Serfling", ]$n_eff) 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   4813    6789    7076    7057    7346    8275 

Model agreement

Example of 2020

And 1918

Check age

Computing Environment

 R version 4.1.2 (2021-11-01)
 Platform: x86_64-w64-mingw32/x64 (64-bit)
 Running under: Windows 10 x64 (build 18363)
 
 Matrix products: default
 
 attached base packages:
 [1] grid      stats     graphics  grDevices utils     datasets  methods  
 [8] base     
 
 other attached packages:
  [1] kableExtra_1.3.4 patchwork_1.1.1  scales_1.1.1     magrittr_2.0.1  
  [5] forcats_0.5.1    stringr_1.4.0    dplyr_1.0.7      purrr_0.3.4     
  [9] readr_2.1.1      tidyr_1.1.4      tibble_3.1.6     ggplot2_3.3.5   
 [13] tidyverse_1.3.1  pacman_0.5.1    
 
To cite R in publications use:

R Core Team (2021). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.

To cite the ggplot2 package in publications use:

Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org.