bootstrap: bootstrap

Description Usage Arguments Details Value Examples

View source: R/bootstrap_function.R

Description

Tool to do a bootstrap on a dataset

Usage

1
bootstrap(observations, method = "mean", nboot = 10000)

Arguments

observations

the column of the dataframe with the observations

method

One of 3 options: "mean" (Defaul), "median" or "selfchoosenmethod". If "selfchoosenmethod" is used, the user has to define the parameter selfchosenmethod as a function that calculates the test-statistic, with the only input being column 2 from the data.

nboot

Number of iterations, Default(10000)

Details

Given a dataset where column 1 specifies the groups and column 2 specifies the observed values for each group, the function makes a bootstrap, the output is a plot of the sample distribut, including confidence interval, mean of obs and sd.

Value

list of class bootstrap

Examples

1
2
3
4
5
suppresMessages(bootstrap(PlantGrowth$weight, method="mean", nboot = 10000))

summary(bootstrap)

plot(bootstrap, bins = 30)

aumath-advancedr2019/Sampling documentation built on Nov. 26, 2019, 2:08 a.m.