bootstrap | R Documentation |
Simplified version of the boot
function.
bootstrap(x, fun, nrep = 1000, conf.level = 0.95, ...)
x |
numeric vector. |
fun |
function to be used for computation ( |
nrep |
number of replicates. |
conf.level |
confidence level for confidence interval. |
... |
additional arguments to |
See help of the boot
function for more explanations.
method |
the character string |
data.name |
a character string giving the name of the data. |
estimate |
the estimated original value |
conf.level |
confidence level for confidence interval. |
rep |
number of replicates. |
conf.int |
limits of the confidence interval. |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
boot
# Confidence interval of a mean
samp <- sample(1:50,10,replace=TRUE)
bootstrap(samp,function(x,i) mean(x[i]))
# Confidence interval of the standard error of the mean
bootstrap(samp,function(x,i) sd(x[i])/sqrt(length(x[i])))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.