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 data containing information on age.

rates

Variable in data containing information on age-specific mortality rates.

surv

Variable in data containing information on age-specific survival probability.

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 data0 containing information on age.

rates0

Variable in data0 containing information on age-specific mortality rates.

surv0

Variable in data0 containing information on age-specific survival probability.

age_specific

Specific 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 ("Dead" by default).

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_aggregated" containing the following components:

References

See Also

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)


[Package lillies version 0.2.12 Index]