# lyl_range

0th

Percentile

##### Life Years Lost at a range of different ages.

lyl estimates remaining life expectancy and Life Years Lost for a given population after a range of specific ages (age_begin to age_end) and restrictied to a maximum theoretical age $\tau$.

##### Usage
lyl_range(data, t0 = NULL, t, status, age_begin, age_end,
censoring_label = "Alive", death_labels = "Dead", tau = 100)
##### Arguments
data

A dataframe, where each raw represents a person. The dataframe will have a time-to-event format with at least two variables: age at end of follow-up (t) and status indicator with death/censoring (status).

t0

Age at start of the follow-up time. Default is NULL, which means all subjects are followed from birth. For delayed entry, t0 indicates beginning of follow-up.

t

Age at the end of the follow-up time (death or censoring).

status

Status indicator, normally 0=alive, 1=dead. Other choices are TRUE/FALSE (TRUE = death) or 1/2 (2=death). For multiple causes of death (competing risks analysis), the status variable will be a factor, whose first level is treated as censoring; or a numeric variable, whose lowest level is treated as censoring. In the latter case, the label for censoring is censoring_label ("Alive" by default).

age_begin

Specific starting age at which the Life Years Lost have to be estimated.

age_end

Specific ending age at which the Life Years Lost have to be estimated.

censoring_label

Label for censoring status ("Alive" by default).

death_labels

Label for event status. For only one cause of death, "Dead" is the default. For multiple causes, the default are the values given in variable status.

tau

Remaining life expectancy and Life Years Lost are estimated restrictied to a maximum theoretical age $\tau$ ($\tau$=100 years by default).

##### Value

A list with class "lyl_range" containing the following components:

• data: Data frame with 3 variables and as many observations as the original data provided to estimate Life Years Lost: t0, t, and status

• LYL: Data frame with (age_end - age_begin + 1) observations and at least 3 variables: age which corresponds to each specific age from age_begin to age_end; life_exp which is the estimated remaining life expectancy at age specific age and before age tau years; and one variable corresponding to the estimated Life Years Lost for each specific cause of death. If only one cause of death is considered (no competing risks), this variable is Dead and includes the total overall Life Years Lost

• tau: Maximum theoretical age $\tau$

• age_begin: Specific starting age at which the Life Years Lost have been estimated

• age_end: Specific ending age at which the Life Years Lost have been estimated

• censoring_label: Label for censoring status

• death_labels: Label(s) for death status

• competing_risks: Logical value (TRUE = more than one cause of death (competing risks))

• numbers_at_risk: Data frame with (tau - age_begin + 1) observations and 2 variables: age which corresponds to each specific age from age_begin to tau; and number which is the number of persons at risk of dying at each specific age

• type: 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.

• lyl for estimation of Life Years Lost at one specific age.

• lyl_diff to compare average Life Years Lost for two populations.

• lyl_checkplot to check whether small numbers could compromise the estimation.

• lyl_ci to estimate bootstrapped confidence intervals.

• summary.lyl_range to summarize objects obtained with function lyl_range.

• plot.lyl_range to plot objects obtained with function lyl_range.

• lyl_range
##### Examples
# NOT RUN {
# Load simulated data as example
data(simu_data)

# }
# NOT RUN {
# Estimate remaining life expectancy and Life Years
# Lost after each age from 0 to 94 years and before age 95 years
lyl_estimation <- lyl_range(data = simu_data, t = age_death, status = death,
age_begin = 0, age_end = 94, tau = 95)

# Visualize data at each different specific age
summary(lyl_estimation)
plot(lyl_estimation)

# Summarize data over an age distribution
summary(lyl_estimation, weights = simu_data$age_disease) # Estimate remaining life expectancy and Life Years # Lost due to specific causes of death after each age # from 0 to 94 years and before age 95 years lyl_estimation2 <- lyl_range(data = simu_data, t = age_death, status = cause_death, age_begin = 0, age_end = 94, tau = 95) # Visualize data at each different specific age summary(lyl_estimation2) plot(lyl_estimation2) # Summarize data over an age distribution summary(lyl_estimation2, weights = simu_data$age_disease)
# }

Documentation reproduced from package lillies, version 0.2.4, License: MIT + file LICENSE

### Community examples

Looks like there are no examples yet.