lyl_aggregated_range: Life Years Lost at a range of different ages using aggregated...

Description Usage Arguments Value References See Also Examples

View source: R/lyl_aggregated_range.R

Description

lyl estimates differences in remaining life expectancy and Life Years Lost for two given life tables data and data0 after a range of specific ages (age_begin to age_end) and restrictied to a maximum theoretical age τ.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
lyl_aggregated_range(
  data,
  age,
  rates,
  surv,
  weights,
  data0,
  age0,
  rates0,
  surv0,
  age_begin,
  age_end,
  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.

weights

Variable in data containing information on number of new cases per age. A weighted average is provided using these weights.

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

tau

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

Value

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

References

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load simulated data as example
data(aggreg_data)
data(pop_ref)

# Estimate remaining life expectancy and Life Years
# Lost after each age from 40 to 89 years and before age 90 years
lyl_summary_data <- lyl_aggregated_range(data = aggreg_data, age = age,
                                         rates = rate, weights = new_cases,
                                         data0 = pop_ref, age0 = age, surv0 = survival,
                                         age_begin = 40, age_end = 89, tau = 90)

# Summarize the data
summary(lyl_summary_data)

lillies documentation built on Feb. 17, 2021, 1:07 a.m.