perc: Extract percentiles from a bootstrap sampling distribution.

View source: R/simpleboot.R

percR Documentation

Extract percentiles from a bootstrap sampling distribution.

Description

perc can be used to extract percentiles from the sampling distribution of a statistic.

Usage

perc(boot.out, p = c(0.025, 0.975))
perc.lm(lm.boot.obj, p)

Arguments

boot.out

Output from either one.boot, two.boot, or pairs.boot.

p

numeric vector with values in [0, 1].

lm.boot.obj

An object of class "lm.simpleboot", returned from lm.boot.

Details

perc automatically calls perc.lm if boot.out is of the class "lm.simpleboot" so there is no need to use perc.lm separately.

Value

For bootstraps which are not linear model bootstraps, perc returns a vector of percentiles of length length(p). Linear interpolation of percentiles is done if necessary. perc.lm returns a matrix of percentiles of each of the model coefficients. For example, if there are k model coefficients, the perc.lm returns a length(p) by k matrix.

Author(s)

Roger D. Peng

Examples

x <- rnorm(100)
b <- one.boot(x, median, R = 1000)
perc(b, c(.90, .95, .99))

simpleboot documentation built on Sept. 11, 2024, 6:21 p.m.

Related to perc in simpleboot...