| lyl_aggregated {lillies} | R Documentation |
Life Years Lost at one specific age using aggregated data.
Description
lyl estimates differences in remaining life expectancy and Life Years Lost
for two given life tables data and data0 after a specific age age_speficic
and restrictied to a maximum theoretical age \tau.
Usage
lyl_aggregated(
data,
age,
rates,
surv,
data0,
age0,
rates0,
surv0,
age_specific,
censoring_label = "Alive",
death_labels = "Dead",
tau = 100
)
Arguments
data |
A dataframe, where each raw represents an age, for the population of interest. The dataframe will contain information on age-specific mortality rates or survivial probability (if both parameters are provided, rates will be used). |
age |
Variable in |
rates |
Variable in |
surv |
Variable in |
data0 |
A dataframe, where each raw represents an age, for the population of reference The dataframe will contain information on age-specific mortality rates or survivial probability (if both parameters are provided, rates will be used). |
age0 |
Variable in |
rates0 |
Variable in |
surv0 |
Variable in |
age_specific |
Specific age at which the Life Years Lost have to be estimated. |
censoring_label |
Label for censoring status ( |
death_labels |
Label for event status ( |
tau |
Remaining life expectancy and Life Years Lost are estimated restrictied to a maximum
theoretical age |
Value
A list with class "lyl_aggregated" containing the following components:
data: Name of the dataset preovided in parameterdatadata0: Name of the dataset preovided in parameterdata0LYL: Data frame with 1 observation and 3 variables:agewhich corresponds toage_spefific; andlife_expandlife_exp0which are the estimated remaining life expectancies at ageage_specificyears and before agetauyears for the population provided indataanddata0, respectivelytau: Maximum theoretical age\tauage_specific: Specific age at which the Life Years Lost have been estimateddata_plot: A data frame in long format with 3 variablestime,cause, andcipused to create a Figure of Life Years Lost with functionplot.censoring_label: Label for censoring statusdeath_labels: Label(s) for death statustype: Whether the estimation is at"age_specific"or"age_range"
References
Andersen PK. Life years lost among patients with a given disease. Statistics in Medicine. 2017;36(22):3573- 3582.
Andersen PK. Decomposition of number of life years lost according to causes of death. Statistics in Medicine. 2013;32(30):5278-5285.
Plana-Ripoll et al. lillies – An R package for the estimation of excess Life Years Lost among patients with a given disease or condition. PLoS ONE. 2020;15(3):e0228073.#'
See Also
lyl_aggregated_rangefor estimation of Life Years Lost for a range of different ages.summary.lyl_aggregatedto summarize objects obtained with functionlyl_aggregated.plot.lyl_aggregatedto plot objects obtained with functionlyl_aggregated.
Examples
# Load simulated data as example
data(aggreg_data)
data(pop_ref)
# Estimate remaining life expectancy and Life Years
# Lost after age 70 years and before age 90 years
lyl_summary_data70 <- lyl_aggregated(data = aggreg_data, age = age, rates = rate,
data0 = pop_ref, age0 = age, surv0 = survival,
age_specific = 70, tau = 90)
# Summarize and plot the data
summary(lyl_summary_data70)
plot(lyl_summary_data70)