tidyboot.logical {tidyboot} | R Documentation |
Non-parametric bootstrap for logical vector data
Description
Computes arbitrary bootstrap statistics on univariate data.
Usage
## S3 method for class 'logical'
tidyboot(data, summary_function = mean,
statistics_functions, nboot = 1000, size = 1, replace = TRUE, ...)
Arguments
data |
A logical 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 binomial distribution
x <- as.logical(rbinom(500, 1, 0.5))
tidyboot(x, statistics_functions = c(ci_lower, mean, ci_upper))
[Package tidyboot version 0.1.1 Index]