lyl_checkplot

0th

Percentile

Plot number of persons at risk at each specific age.

Given a lyl_range-class object, lyl_checkplot draws numbers of persons at risk of dying at each specific age from age_begin until age \(\tau\).

Usage
lyl_checkplot(x)
Arguments
x

An object of class lyl_range obtained with the lyl_range function.

Value

A plot with the number of persons at risk at each specific age.

See Also

lyl_range for estimation of Life Years Lost for a range of different ages.

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

# 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 = 45, age_end = 50, tau = 95)

# Check whether small numbers could compromise the results
lyl_checkplot(lyl_estimation)

# The plot can be modified with a usual ggplot2 format
lyl_checkplot(lyl_estimation) +
  ggplot2::geom_hline(yintercept = 10, linetype = "dashed", color = "red") +
  ggplot2::xlab("Age [in years]") +
  ggplot2::ggtitle("Persons at risk of dying at each age 0-94 years")

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

Community examples

Looks like there are no examples yet.