ci: Confidence interval helper function

View source: R/np_utility.R

ciR Documentation

Confidence interval helper function

Description

Designed to be used by boot95ci to calculate a bootstrap model of an aggregator function given by agg.

Usage

ci(x, indices, agg)

Arguments

x

numeric vector

indices

numeric vector: Indicies are passed to calculated individual bootstaps of x

agg

character: A string corresponding to the aggregate or central tendency function to be modeled (eg. median, mean, etc.)

Details

This is a convenience function internal to NicePlots and is not exported. The variable agg should be a string corresponding an aggregator function such as mean or median. The indicies designed to passed from the boot function from the package boot and are used to determine calculated the different bootstrap iterations of the agg functions on x.

Value

a number corresponding to a bootstrap iteration of the aggregator function given by agg

See Also

boot, boot95ci

Examples

#Calculates the median of Sepal.Length from the iris data set
data(iris)
#ci(iris$Sepal.Length,"median",seq(1,length(iris$Sepal.Length)))

ZachHunter/NicePlots.R documentation built on Sept. 23, 2023, 4:04 a.m.