confidence_bootstrap | R Documentation |
Computes equi-tailed two-sided nonparametric confidence interval.
confidence_bootstrap(object, ...)
## S4 method for signature 'numeric'
confidence_bootstrap(
object,
level = 0.95,
type = c("basic", "normal", "student", "percentiles"),
t0 = NULL,
var_t0 = NULL,
var_t = NULL,
...
)
object |
A |
... |
Currently not used. |
level |
A length-one |
type |
A |
t0 |
A length-one |
var_t0 |
A length-one |
var_t |
A |
A length-two numeric
vector giving the lower and upper confidence
limits.
N. Frerebeau
Davison, A. C. & Hinkley, D. V. (1997). Bootstrap Methods and Their Application. Cambridge Series on Statistical and Probabilistic Mathematics. Cambridge: Cambridge University Press.
bootstrap()
Other summary statistics:
confidence_binomial()
,
confidence_mean()
,
confidence_multinomial()
,
interval_credible()
,
interval_hdr()
x <- rnorm(20)
## Bootstrap
bootstrap(x, do = mean, n = 100)
## Estimate the 25th and 95th percentiles
quant <- function(x) { quantile(x, probs = c(0.25, 0.75)) }
bootstrap(x, n = 100, do = mean, f = quant)
## Get the n bootstrap estimates
(z <- bootstrap(x, n = 100, do = mean, f = function(x) { x }))
## Basic bootstrap confidence interval
confidence_bootstrap(z, level = 0.95, type = "basic", t0 = mean(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.