| ipr_boot | R Documentation |
Obtaining confidence intervals for IPR estimates via bootstrapping. Three types of bootstrap methods are implemented.
ipr_boot(X, y, method = "normal", conf.level = 0.95, B = 100, ...)
X |
Matrix with |
y |
Vector where |
method |
A string representing the type of intervals to be computed.
The value can be |
conf.level |
A scalar containing the confidence level. Default value is 0.95. |
B |
Number of resamplings to get the intervals. Default value is 100. |
... |
Other arguments of the |
Let \hat{\mu} be a p-dimensional vector with the estimated costs of the
diseases, obtained via the IPR algorithm. The function ipr_boot computes
confidence intervals for these costs, via a bootstrapping technique. We draw B bootstrap samples
and apply the IPR algorithm on each of them. Three possibilities are then implemented to get confidence intervals.
The normal bootstrap is based on a normal distribution of the estimator.
We compute \hat{\sigma}, a vector with the estimated standard errors
of the costs of each disease, using our B samples. Confidence intervals are
then obtained by computing \hat{\mu} \pm z_{1-\alpha/2}\cdot\hat{\sigma}.
The two other methods are computed with the \alpha/2- and
1-\alpha/2-quantiles of the bootstrap distribution.
Let us notice them by q_{\alpha/2} and q_{1-\alpha/2}.
The percentile bootstrap is given by these two quantiles
(see Davison and Hinkley 1997, Equation (5.6) on page 194).
The basic bootstrap is given by the equations
2\hat{\mu}-q_{1-\alpha/2} for the lower bound, and
2\hat{\mu}-q_{\alpha/2} for the upper bound (see Davison and Hinkley 1997, Equation (5.18) on page 203).
Considering B = 100 bootstrap samples may be enough with the normal bootstrap.
However, higher values should be used with percentile or basic bootstrap.
Since the bootstrap samples are randomly defined, the user should define a random seed
(e.g., set.seed(1234)) before using ipr_boot.
estimate |
A vector with the estimated average cost of each disease. |
lower |
A vector with the lower bounds of the confidence intervals. |
upper |
A vector with the upper bounds of the confidence intervals. |
lower_normal |
If the method is |
upper_normal |
If the method is |
lower_perc |
If the method is |
upper_perc |
If the method is |
lower_basic |
If the method is |
upper_basic |
If the method is |
Jean-Benoit Rossel (jean-benoit.rossel@unisante.ch), Valentin Rousson, and Yves Eggli.
Davison, A. C., & Hinkley, D. V. (1997). Bootstrap methods and their application. Cambridge university press.
Rousson, V., Rossel, J.-B. & Eggli, Y. (2019). Estimating Health Cost Repartition Among Diseases in the Presence of Multimorbidity. Health Services Research and Managerial Epidemiology, 6.
Rossel, J.-B., Rousson, V. & Eggli, Y. (2021). A comparison of statistical methods for allocating disease costs in the presence of interactions. Statistics in Medicine, 40(14).
ipr
# Simulation of data with 30 patients and 7 diseases.
set.seed(123456)
n <- 30
p <- 7
X <- matrix(0,n,p,byrow=TRUE)
for(i in 1:n) X[i,] <- rbinom(p, size=1, prob=0.5)
# Simulation of costs. We consider lognormally distributed prices.
mean <- 1000
sdlog <- 0.2
cost <- matrix(rlnorm(n*p,log(mean)-sdlog^2/2,sdlog),n,p,byrow=TRUE)
y <- apply(X*cost,1,sum)
# Here are the estimated costs provided by IPR algorithm,
# and confidence intervals based on bootstrap techniques:
ipr_boot(X,y,method="all",B=1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.