lillies: An R package for the estimation of excess Life Years Lost among patients with a given disease or condition

PLoS One. 2020 Mar 6;15(3):e0228073. doi: 10.1371/journal.pone.0228073. eCollection 2020.


Life expectancy at a given age is a summary measure of mortality rates present in a population (estimated as the area under the survival curve), and represents the average number of years an individual at that age is expected to live if current age-specific mortality rates apply now and in the future. A complementary metric is the number of Life Years Lost, which is used to measure the reduction in life expectancy for a specific group of persons, for example those diagnosed with a specific disease or condition (e.g. smoking). However, calculation of life expectancy among those with a specific disease is not straightforward for diseases that are not present at birth, and previous studies have considered a fixed age at onset of the disease, e.g. at age 15 or 20 years. In this paper, we present the R package lillies (freely available through the Comprehensive R Archive Network; CRAN) to guide the reader on how to implement a recently-introduced method to estimate excess Life Years Lost associated with a disease or condition that overcomes these limitations. In addition, we show how to decompose the total number of Life Years Lost into specific causes of death through a competing risks model, and how to calculate confidence intervals for the estimates using non-parametric bootstrap. We provide a description on how to use the method when the researcher has access to individual-level data (e.g. electronic healthcare and mortality records) and when only aggregated-level data are available.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Adolescent
  • Adult
  • Age of Onset
  • Aged
  • Aged, 80 and over
  • Cause of Death / trends*
  • Child
  • Child, Preschool
  • Data Interpretation, Statistical*
  • Electronic Health Records / statistics & numerical data
  • Female
  • Global Health / statistics & numerical data
  • Global Health / trends
  • Humans
  • Infant
  • Life Expectancy / trends*
  • Male
  • Middle Aged
  • Risk Assessment / methods
  • Software*
  • Statistics, Nonparametric
  • Young Adult

Grants and funding

This work was supported by the European Union’s Horizon 2020 research and innovation programme (Marie Sklodowska-Curie grant agreement No 837180 to Oleguer Plana-Ripoll), the Danish National Research Foundation (Niels Bohr Professorship to John J McGrath), and the National Health and Medical Research Council (John Cade Fellowship to John J McGrath). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.