# Replication materials for Vaupel, J. W., Bergeron-Boucher, M.-P., & Kashnitsky, I. (2021). Outsurvival as a measure of the inequality of lifespans between two populations. Demographic Research. Twitter: @jwvaupel, @bergeron_mp, @ikashnitsky Emails: jvaupel@sdu.dk, mpbergeron@sdu.dk, ikashnitsky@sdu.dk SocArXiv preprint: https://doi.org/10.31235/osf.io/gsdkx Github: https://github.com/CPop-SDU/outsurvival-demres Zenodo: https://doi.org/10.5281/zenodo.4573914 # Package description All the figures and calculations displayed and quoted in the paper can be replicated using the R script `src/replication.R`. The script uses data from `dat/` directory. Each `.txt` file with data contains a brief description of the dataset and a reference to the source of data. Produced figures are stored in `fig` directory. # Files =LICENSE -- code license =dat -- directory with data files as plain text .txt files ===dat/LifeTable_Education_ISTAT.txt Life table extracted from ISTAT: Life tables by educational attainment for the year 2012. Available at http://dati.istat.it/Index.aspx?DataSetCode=DCIS_MORTALITA1&Lang=en (Accessed on 2020-09-08). ===dat/LifeTable_Race_CDC.txt Life tables extracted from the CDC: CDC. 2019. "United States Life Tables, 2017." National Vital Statistics Report 68 (7) (Accessed on 2020-09-09) ===dat/LifeTable_Sex_HMD.txt Life tables extracted from the HMD: MD. 2020. Human Mortality Database. University of California, Berkeley (USA), and Max Planck Institute for Demographic Research (Germany), Available at www.mortality.org (Accessed on 2020-09-09) ===dat/Population_Italy_Ireland.txt Eurostat. (2020). Population on 1 January by age, sex and NUTS 3 region. https://ec.europa.eu/eurostat/web/regions/data/database (Accessed on 2020-10-23) ===dat/Population_byIncomeSex_USCB.txt Population by income, sex: U.S. Census Bureau. 2020. PINC-01. Selected Characteristics of People 15 Years and Over, by Total Money Income, Work Experience, Race, Hispanic Origin, and Sex. 2019 Total Work Experience. (Accessed on 2020-10-18) =fig -- directory to store output figures =outsurvival-demres.Rproj -- RStudio project file =src -- directory with R code ===src/replication.R -- R script that replicates all the calculations and figures # Replication how-to 1. Unzip the contents of the replication package wherever you feel like. Alternatively, fork the GitHub repository: https://github.com/CPop-SDU/outsurvival-demres. 2. Using RStudio open "outsurvival-demres.Rproj" file in the main project directory. 3. Follow the "scr/replication.R" file. The figures will be stored in the sub-directory "fig". Calculation results will be displayed in the console of the R session. # System and session info ## System setting value version R version 4.0.2 (2020-06-22) os macOS Catalina 10.15.5 system x86_64, darwin17.0 ui RStudio language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz Europe/Copenhagen date 2021-03-09 ## R packages package * version date lib source dplyr * 1.0.2 2020-08-18 [1] CRAN (R 4.0.2) forcats * 0.5.0 2020-03-01 [1] CRAN (R 4.0.0) ggplot2 * 3.3.2 2020-06-19 [1] CRAN (R 4.0.0) here * 0.1 2017-05-28 [1] CRAN (R 4.0.0) hrbrthemes * 0.8.0 2020-03-06 [1] CRAN (R 4.0.0) magrittr * 2.0.1 2020-11-17 [1] CRAN (R 4.0.2) patchwork * 1.0.1 2020-06-22 [1] CRAN (R 4.0.0) purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.0.0) readr * 1.3.1 2018-12-21 [1] CRAN (R 4.0.0) stringr * 1.4.0 2019-02-10 [1] CRAN (R 4.0.0) tibble * 3.0.3 2020-07-10 [1] CRAN (R 4.0.2) tidyr * 1.1.2 2020-08-27 [1] CRAN (R 4.0.2) tidyverse * 1.3.0 2019-11-21 [1] CRAN (R 4.0.0) # See also Bergeron-Boucher, M.-P., Alvarez, J.-A., Kashnitsky, I., Zarulli, V., & Vaupel, J. W. (2020). Not all females outlive all males: A new perspective on lifespan inequalities between sexes. SocArXiv. https://doi.org/10.31235/osf.io/typws