ipr_boot: Bootstrap Confidence Intervals for Iterative Proportional...

View source: R/ipr_boot.R

ipr_bootR Documentation

Bootstrap Confidence Intervals for Iterative Proportional Repartition (IPR) algorithm

Description

Obtaining confidence intervals for IPR estimates via bootstrapping. Three types of bootstrap methods are implemented.

Usage

ipr_boot(X, y, method = "normal", conf.level = 0.95, B = 100, ...)

Arguments

X

Matrix with x_{ij}=1 if patient i suffers from disease j and x_{ij}=0 otherwise. Each row thus refers to one patient and each column to one disease. The number of columns of X corresponds to the number of diseases considered.

y

Vector where y_i is the global health cost of patient i. The length of y must be equal to the number of rows of X.

method

A string representing the type of intervals to be computed. The value can be normal (default), basic, or perc, in order to get the normal, basic, or percentile bootrstrap intervals, respectively. See details below. A value of all can also be used, to get the three intervals.

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 ipr function.

Details

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.

Value

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 all, lower bounds obtained via normal bootstrap.

upper_normal

If the method is all, upper bounds obtained via normal bootstrap.

lower_perc

If the method is all, lower bounds obtained via percentile bootstrap.

upper_perc

If the method is all, upper bounds obtained via percentile bootstrap.

lower_basic

If the method is all, lower bounds obtained via basic bootstrap.

upper_basic

If the method is all, upper bounds obtained via basic bootstrap.

Author(s)

Jean-Benoit Rossel (jean-benoit.rossel@unisante.ch), Valentin Rousson, and Yves Eggli.

References

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).

See Also

ipr

Examples

  # 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)

ipr documentation built on Sept. 11, 2026, 5:06 p.m.

Related to ipr_boot in ipr...