CI | R Documentation |
Bootstrap confidence intervals - percentile method or t interval.
CI.percentile(x, confidence = 0.95, expand = TRUE, ..., probs = sort(1 + c(-1, 1) * confidence) / 2) CI.t(x, confidence = 0.95, expand = TRUE, probs = sort(1 + c(-1, 1) * confidence) / 2) CI.bca(x, confidence = 0.95, expand = TRUE, L = NULL, probs = sort(1 + c(-1, 1) * confidence) / 2) CI.bootstrapT(x, confidence = 0.95, probs = sort(1 + c(-1, 1) * confidence) / 2)
x |
a |
confidence |
confidence level, between 0 and 1. The default 0.95 gives a 95% two-sided interval. |
expand |
logical, if |
... |
additional arguments to pass to |
probs |
probability values, between 0 and 1. |
L |
vector of length |
CI.bootstrapT
assumes the first dimension of the statistic
is an estimate, and the second is proportional to a SE for the
estimate. E.g. for bootstrapping the mean, they could be the mean and s.
This is subject to change.
CI.bca
and CI.bootstrapT
currently only support
a single sample.
a matrix with one column for each value in probs
and one row
for each statistic.
Tim Hesterberg timhesterberg@gmail.com,
https://www.timhesterberg.net/bootstrap-and-resampling
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.
bootstrap
,
bootstrap2
,
ExpandProbs
(for the expanded intervals).
# See full set of examples in resample-package, including different # ways to call all four functions depending on the structure of the data. data(Verizon) CLEC <- with(Verizon, Time[Group == "CLEC"]) bootC <- bootstrap(CLEC, mean, seed = 0) bootC2 <- bootstrap(CLEC, c(mean = mean(CLEC), sd = sd(CLEC)), seed = 0) CI.percentile(bootC) CI.t(bootC) CI.bca(bootC) CI.bootstrapT(bootC2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.