Learn R Programming

ANSM5 (version 1.1.1)

bs: Create bootstrap confidence interval

Description

bs() creates a bootstrap confidence interval and is used in chapter 14 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

bs(x, y = NULL, CI.width = 0.95, nsims.bs = 10000, seed = NULL)

Value

A list object object with the results from applying the function

Arguments

x

Numeric vector

y

Numeric vector or NULL (defaults to NULL)

CI.width

Confidence interval width (defaults to 0.95)

nsims.bs

Number of bootstrap samples to be taken (defaults to 10000)

seed

Random number seed to be used for Monte Carlo simulations (defaults to NULL)

Examples

Run this code
# Example 14.5 from "Applied Nonparametric Statistical Methods" (5th edition)
bs(ch14$example14.2, nsims.bs = 2000, CI.width = 0.95, seed = 1)
bs(ch14$example14.2, nsims.bs = 2000, CI.width = 0.99, seed = 1)

Run the code above in your browser using DataLab