Description Usage Arguments Details Value Author(s) References See Also
Calculates bias-corrected and accelerated confidence intervals.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
thetahatstar |
Numeric vector.
The bootstrap sampling distribution
≤ft( \boldsymbol{\hat{θ}^{*}} \right),
that is,
the sampling distribution of |
thetahat |
Numeric. Parameter estimate ≤ft( \hat{θ} \right) from the original sample data. |
data |
Vector, matrix, or data frame.
Sample data.
Ignored if |
fitFUN |
Function.
Fit function to use on |
... |
Arguments to pass to |
alpha |
Numeric vector.
Significance level
≤ft( α \right) .
By default,
|
wald |
Logical.
If |
null |
Numeric.
Hypothesized value of |
dist |
Character string.
|
df |
Numeric.
Degrees of freedom (df) if |
eval |
Logical.
Evaluate confidence intervals using
|
theta |
Numeric. Population parameter ≤ft( θ \right) . |
par |
Logical.
If |
ncores |
Integer.
Number of cores to use if |
mc |
Logical.
If |
lb |
Logical.
If |
cl_eval |
Logical.
Execute |
cl_export |
Logical.
Execute |
cl_expr |
Expression.
Expression passed to |
cl_vars |
Character vector.
Names of objects to pass to |
The estimated bootstrap standard error is given by
\widehat{\mathrm{se}}_{\mathrm{B}} ≤ft( \hat{θ} \right) = √{ \frac{1}{B - 1} ∑_{b = 1}^{B} ≤ft[ \hat{θ}^{*} ≤ft( b \right) - \hat{θ}^{*} ≤ft( \cdot \right) \right]^2 }
where
\hat{θ}^{*} ≤ft( \cdot \right) = \frac{1}{B} ∑_{b = 1}^{B} \hat{θ}^{*} ≤ft( b \right) .
In addition to the bias-correction
\hat{z}_{0}
discussed in bc()
,
the acceleration
\hat{a},
which refers to the rate of change
of the standard error of
\hat{θ}
with respect to the true parameter value
θ,
is factored in.
The acceleration \hat{a} is given by
\hat{a} = \frac{ ∑_{i = 1}^{n} ≤ft[ \hat{θ}_{ ≤ft( \cdot \right) } - \hat{θ}_{ ≤ft( i \right) } \right]^{3} } { 6 ≤ft\{ ∑_{i = 1}^{n} ≤ft[ \hat{θ}_{ ≤ft( \cdot \right) } - \hat{θ}_{ ≤ft( i \right)} \right]^{2} \right\}^{3/2} }
where
\hat{θ}_{ ≤ft( i \right) } = ≤ft\{ \hat{θ}_{≤ft( 1 \right)}, \hat{θ}_{≤ft( 2 \right)}, \hat{θ}_{≤ft( 3 \right)}, …, \hat{θ}_{≤ft( n \right)} \right\}
is the jackknife sampling distribution and
\hat{θ}_{ ≤ft( \cdot \right) } = \frac{1}{n} ∑_{i = 1}^{n} \hat{θ}_{ ≤ft( i \right) }
is the jackknife mean.
See
jack()
and
jack_hat()
.
Using \hat{z}_{0} and \hat{a} we can obtain the adjusted z-scores as follows
z_{ \mathrm{BCa}_{\mathrm{lo}} } = \hat{z}_{0} + \frac{ \hat{z}_{0} + z_{ ≤ft( \frac{ α } { 2 } \right) } } { 1 - \hat{a} ≤ft[ \hat{z}_{0} + z_{ ≤ft( \frac{ α } { 2 } \right) } \right] } ,
z_{ \mathrm{BCa}_{\mathrm{up}} } = \hat{z}_{0} + \frac{ \hat{z}_{0} + z_{ ≤ft[ 1 - \frac{ α } { 2 } \right] } } { 1 - \hat{a} ≤ft[ \hat{z}_{0} + z_{ ≤ft( 1 - \frac{ α } { 2 } \right) } \right] } .
The adjusted z-scores are used to determine the adjusted percentile ranks to form the confidence interval.
The bias-corrected and accelerated confidence interval is given by
≤ft[ \hat{θ}_{\mathrm{lo}}, \hat{θ}_{\mathrm{up}} \right] = ≤ft[ \hat{θ}^{*}_{ ≤ft( z_{ \mathrm{BCa}_{ \mathrm{lo} } } \right) }, \hat{θ}^{*}_{ ≤ft( z_{ \mathrm{BCa}_{ \mathrm{up} } } \right) } \right] .
For more details and examples see the following vignettes:
Notes: Introduction to Nonparametric Bootstrapping
Notes: Introduction to Parametric Bootstrapping
Returns a vector with the following elements:
Square root of Wald test statistic. NA
if wald = FALSE
.
p-value. NA
if wald = FALSE
.
Estimated bootstrap standard error ≤ft( \widehat{\mathrm{se}}_{\mathrm{B}} ≤ft( \hat{θ} \right) \right).
Estimated bias-corrected and accelerated confidence limits corresponding to alpha from the bootstrap sampling distribution thetahatstar ≤ft( \boldsymbol{\hat{θ}^{*}} \right).
If eval = TRUE
,
appends the following to the results vector
Logical. Tests if confidence interval contains zero.
Logical. Tests if confidence interval contains theta.
Length of confidence interval.
Shape of confidence interval.
Ivan Jacob Agaloos Pesigan
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. New York, N.Y: Chapman & Hall.
Other bootstrap confidence interval functions:
.bca()
,
bc()
,
pc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.