myboot: MATH4753COUR0004::myBoot()

Description Usage Arguments Value Examples

Description

Facilitates a bootstrap procedure. This may be used to make a number of plots, point, and interval estimates and useful output in the form of a list.

Usage

1
myBoot(iter = 10000, x, fun = "mean", alpha = 0.05, ...)

Arguments

iter

The number of iterations you would like for the function to sample.

x

A vector of values to pass in as the sample

fun

The name of the function you would like to apply.

alpha

The amount of confidence you would like, must be between 0 and 1

...

Other arguments which will be passed to the hist() function for use with a plot.

Value

Returns the confidence interval, function, and original vector which was passed to x. This will be returned in the form of a vector.

Examples

1
2
3
set.seed(39)
sam=rnorm(25,mean=25,sd=10)
mb2_1=myboot2(iter=10000,x=sam,fun="mean",alpha=0.05,xlab="mean",col="red")

pojac3/MATH4753COUR0004 documentation built on Nov. 22, 2020, 10:20 a.m.