lyl_ci: Confidence intervals for Life Years Lost.

Description Usage Arguments Value References See Also Examples

View source: R/lyl_ci.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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
lyl_estimation_ci2 <- lyl_ci(lyl_estimation2, niter = 10)
summary(lyl_estimation_ci2, weights = simu_data$age_disease)
plot(lyl_estimation_ci2, weights = simu_data$age_disease)

lillies documentation built on March 13, 2020, 9:09 a.m.

Related to lyl_ci in lillies...