lillies (version 0.2.4)

plot.lyl_aggregated: Plot Life Years Lost at one specific age for two different populations obtained from aggregated data

Description

plot for objects of class lyl_aggregated creates a figure of Life Years Lost at one specific age for two different populations.

Usage

# S3 method for lyl_aggregated
plot(x, colors = NA,
  labels = c("Population of interest", "Reference population"), ...)

Arguments

x

An object of class lyl_aggregated (obtained with function lyl_aggregated).

colors

Vector with one color for each cause of death. Default is NA, and default colors are used.

labels

Vector with labels for the two populations (default are "Population of interest" for data, and "Reference population" for data0; which are provided to function lyl_aggregated.)

...

Additional arguments affecting the plot produced.

Value

A plot with survival function and stacked cause-specific cumulative incidences for two populations side by side.

See Also

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

Examples

Run this code
# NOT RUN {
# 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)

# Plot the data
plot(lyl_summary_data70)

# }

Run the code above in your browser using DataLab