slipper_ci(df, expr, B = 100, lower = 0.025, upper = 0.975)A data frame
A an expression with a function that operates on one or more variables from the data frame.
the number of bootstrap samples to draw
the lower percentile for the confidence interval (default 2.5
upperthe upper percentile for the confidence interval (default 97.5
confint A vector with the lower bound and upper bound
Takes a data frame, a function that returns a single number, and a number of replicates and returns a data frame with the function calculated on the observed sample and on B bootstrap samples.
# Boostrap the mean of the mpg variable in the mtcars data set and get a confidence # interval slipper_ci(mtcars,mean(mpg),B=100)
# Bootstrap the mean of the mpg variable with piping mtcars %>% slipper_ci(mean(mpg),B=100)