boot95ci | R Documentation |
Calculates a basic 95% boostrap confidence interval for an aggregator function
boot95ci(x, agg = "mean", upper = FALSE, nBoot = 1000L)
x |
numeric vector |
agg |
character: A string corresponding to the aggregate or central tendency function to be modeled (eg. |
upper |
logical: Should the upper or lower confidence interval boundary be returned |
nBoot |
numeric; An integer value indicating the number of boot strap resampling trails to run. Defaults to 1,000. |
This function calculates a bootstrap 95% confidence interval for a aggregator function determined by the agg
variable.
The number of iterations is hard coded at 1000. The variable upper
will cause to return the upper bound of the 95%
confidence interval if set to TRUE
or the lower bound if set to FALSE
.
a number corresponding to the upper or lower bootrap 95% confidence interval of the aggregator function given by agg
.
prepBarData
, niceBar
, boot
, boot.ci
library(boot)
data(iris)
median(iris$Sepal.Width)
#boot95ci(iris$Sepal.Width,agg="median",upper=FALSE)
#boot95ci(iris$Sepal.Width,agg="median",upper=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.