Tool to do a bootstrap on a dataset

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)

Value

list of class bootstrap

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.

Examples

suppresMessages(bootstrap(PlantGrowth$weight, method="mean", nboot = 10000))
#> Error in suppresMessages(bootstrap(PlantGrowth$weight, method = "mean", nboot = 10000)): could not find function "suppresMessages"
summary(bootstrap)
#> Error in object[[i]]: object of type 'closure' is not subsettable
plot(bootstrap, bins = 30)
#> Error in curve(expr = x, from = from, to = to, xlim = xlim, ylab = ylab, ...): 'expr' did not evaluate to an object of length 'n'