Learn R Programming

resample (version 0.6)

ExpandProbs: Calculate modified probabilities for more accurate confidence intervals

Description

Compute modified quantiles levels, for more accurate confidence intervals. Using these levels gives sider intervals, with closer to desired coverage.

Usage

ExpandProbs(probs, n)

Arguments

probs

vector of numerical values between 0 and 1.

n

number of observations.

Value

A vector like probs, but with values closer to 0 and 1.

Details

Bootstrap percentile confidence interval for a sample mean correspond roughly to $$\bar x \pm z_\alpha \hat\sigma$$ instead of $$\bar x \pm t_{\alpha,n-1} s$$ where $$\hat\sigma = \sqrt{(n-1)/n s}$$ is like s but computed using a divisor of n instead of n-1. Similarly for other statistics, the bootstrap percentile interval is too narrow, typically by roughly the same proportion.

This function finds modified probability levels probs2, such that $$z_{\mbox{probs2}} \sqrt{(n-1)/n} = t_{\mbox{probs}, n-1}$$ z_probs2 sqrt((n-1)/n) = t_probs,n-1 so that for symmetric data, the bootstrap percentile interval approximately matches the usual $t$ confidence interval.

References

This discusses the expanded percentile interval: Hesterberg, Tim (2014), What Teachers Should Know about the Bootstrap: Resampling in the Undergraduate Statistics Curriculum, https://arxiv.org/abs/1411.5279.

See Also

CI.percentile, CI.bca,

Examples

Run this code
# NOT RUN {
probs <- c(0.025, 0.975)
n <- c(5, 10, 20, 40, 100, 200, 1000)
outer(probs, n, ExpandProbs)
# }

Run the code above in your browser using DataLab