Description Usage Arguments Details Value Author(s) References See Also Examples

This function uses the method proposed by DiCiccio and Efron (1996)
to generate confidence intervals that produce more accurate coverage
rates when the distribution of bootstrap draws is non-normal.
This code is adapted from the `BC.CI()`

function within the
`mediate`

function in the `mediation`

package.

1 | ```
bca(theta, conf.level = 0.95)
``` |

`theta` |
a vector that contains draws of a quantity of interest using bootstrap samples.
The length of |

`conf.level` |
the level of the desired confidence interval, as a proportion. Defaults to .95 which returns the 95 percent confidence interval. |

*BC_a* confidence intervals are typically calculated using influence statistics
from jackknife simulations. For our purposes, however, running jackknife simulation in addition
to ordinary bootstrapping is too computationally expensive. This function follows the procedure
outlined by DiCiccio and Efron (1996, p. 201) to calculate the bias-correction and acceleration
parameters using only the draws from ordinary bootstrapping.

returns a vector of length 2 in which the first element is the lower bound and the second element is the upper bound

Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden@nd.edu>, based
on the code for the `mediate`

function in the `mediation`

package
by Dustin Tingley, Teppei Yamamoto, Kentaro Hirose, Luke Keele, and Kosuke Imai.

DiCiccio, T. J. and B. Efron. (1996). Bootstrap Confidence Intervals. *Statistical Science*.
11(3): 189–212. https://doi.org/10.1214/ss/1032280214

1 2 |

```
Loading required package: rms
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: ‘Hmisc’
The following objects are masked from ‘package:base’:
format.pval, units
Loading required package: SparseM
Attaching package: ‘SparseM’
The following object is masked from ‘package:base’:
backsolve
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
[1] -4.742072 10.625582
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.