lyl_ci {lillies}R Documentation

Confidence intervals for Life Years Lost.

Description

lyl_ci estimates confidence intervals for Life Years Lost using non-parametric bootstrap. The confidence level can be specified when summarizing the results with the function summary.lyl_ci.

Usage

lyl_ci(lyl_estimation, niter = 1000)

Arguments

lyl_estimation

An object of class lyl or lyl_range.

niter

Number of iterations for the bootstrap (default is 1,000).

Value

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

References

See Also

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

Examples

# Load simulated data as example
data(simu_data)

# Estimate remaining life expectancy and Life Years
# Lost after age 45 years and before age 95 years
lyl_estimation <- lyl(data = simu_data, t = age_death, status = death,
                      age_specific = 45, tau = 95)


# Calculate bootstrapped confidence interval (3 iterations to test; more are necessary)
lyl_estimation_ci <- lyl_ci(lyl_estimation, niter = 3)
summary(lyl_estimation_ci)
plot(lyl_estimation_ci)

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

# Calculate bootstrapped confidence interval (3 iterations to test; more are necessary)
lyl_estimation_ci2 <- lyl_ci(lyl_estimation2, niter = 3)
summary(lyl_estimation_ci2, weights = simu_data$age_disease)
plot(lyl_estimation_ci2, weights = simu_data$age_disease)


[Package lillies version 0.2.12 Index]