MyNixOS website logo
Description

Combine Parameter Estimates via Parametric Bootstrap.

Propagate uncertainty from several estimates when combining these estimates via a function. This is done by using the parametric bootstrap to simulate values from the distribution of each estimate to build up an empirical distribution of the combined parameter. Finally either the percentile method is used or the highest density interval is chosen to derive a confidence interval for the combined parameter with the desired coverage. Gaussian copulas are used for when parameters are assumed to be dependent / correlated. References: Davison and Hinkley (1997,ISBN:0-521-57471-4) for the parametric bootstrap and percentile method, Gelman et al. (2014,ISBN:978-1-4398-4095-5) for the highest density interval, Stockdale et al. (2020)<doi:10.1016/j.jhep.2020.04.008> for an example of combining conditional prevalences.

bootComb

Deriving confidence intervals for combinations of independent parameter estimates.

Citation

Please use the following to cite the use of this R package in publications:

  • Henrion, M.Y.R. (2021). bootComb - An R Package to Derive Confidence Intervals for Combinations of Independent Parameter Estimates. International Journal of Epidemiology, dyab049. https://doi.org/10.1093/ije/dyab049

Description

This is an R package to combine several estimates via a arbitrary function to compute a new parameter.

Uncertainty is propagated through by sampling from probability distributions for each estimate and then deriving an empirical interval containing 95% of the resulting distribution (either via highest density interval or quantiles).

Several specific applications, though the methodology is quite general:

  1. Combining several conditional prevalences (see e.g. Stockdale et al., J. Hepatol. (2020))
  2. Adjusting a prevalence for assay sensitivity and specificity when the latter are not known exactly and only estimates are available.

By default, the method assumes that the combined estimates are independent. This is generally the case where parameters estimated on different, reasonably large datasets are combined, but in some situations this may not hold (e.g. when parameters themselves are not independent). Where this assumption is likely not met, users can specify a correlation matrix for the input parameters. The package uses a Gaussian copula function to implement the dependence structure.

Installation

From CRAN (stable version)

install.packages('bootComb')

From GitHub (development version)

# install.packages("devtools")
devtools::install_github("gitMarcH/bootComb")

Example

95% confidence interval for the product of 2 prevalence parameters for which only the 95% confidence intervals are known. The seed argument is not needed - it just allows exact reproduction of the example.

library(bootComb)

dist1<-getBetaFromCI(qLow=0.2,qUpp=0.8,alpha=0.05)
dist2<-getBetaFromCI(qLow=0.4,qUpp=0.9,alpha=0.05)

distListEx<-list(dist1$r,dist2$r)
combFunEx<-function(pars){pars[[1]]*pars[[2]]}

bootComb(distList=distListEx,combFun=combFunEx,method="hdi",seed=123)
#> 
#> $conf.int
#>     lower     upper 
#> 0.1034161 0.5854474  
#> attr(,"credMass")
#> [1] 0.95
#> 
#> $bootstrapValues
#> NULL

Alternatively, the same result can also be arrived at in just 2 lines of code:

combFunEx<-function(pars){pars[[1]]*pars[[2]]}
bootComb(distributions=c("beta","beta"),qLowVect=c(0.2,0.4),qUppVect=c(0.8,0.9),combFun=combFunEx,method="hdi",seed=123)
#> 
#> $conf.int
#>     lower     upper 
#> 0.1034161 0.5854474  
#> attr(,"credMass")
#> [1] 0.95
#> 
#> $bootstrapValues
#> NULL
Metadata

Version

1.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows