tidyboot.numeric {tidyboot} | R Documentation |
Non-parametric bootstrap for numeric vector data
Description
Computes arbitrary bootstrap statistics on univariate data.
Usage
## S3 method for class 'numeric'
tidyboot(data, summary_function = mean,
statistics_functions, nboot = 1000, size = 1, replace = TRUE, ...)
Arguments
data |
A numeric vector of data to bootstrap over. |
summary_function |
A function to be computed over each set of samples.
This function needs to take a vector and return a single number (defaults
to |
statistics_functions |
A named list of functions to be computed over the set of summary values from all samples. |
nboot |
The number of bootstrap samples to take (defaults to
|
size |
The fraction of items to sample (defaults to 1). |
replace |
Logical indicating whether to sample with replacement
(defaults to |
... |
Other arguments passed from generic. |
Examples
## Mean and 95% confidence interval for 500 samples from a normal distribution
x <- rnorm(500, mean = 0, sd = 1)
tidyboot(x, statistics_functions = list("ci_lower" = ci_lower,
"mean" = mean,
"ci_upper" = ci_upper))
[Package tidyboot version 0.1.1 Index]