| tidy_bootstrap {TidyDensity} | R Documentation |
Bootstrap Empirical Data
Description
Takes an input vector of numeric data and produces a bootstrapped nested tibble by simulation number.
Usage
tidy_bootstrap(
.x,
.num_sims = 2000,
.proportion = 0.8,
.distribution_type = "continuous"
)
Arguments
.x |
The vector of data being passed to the function. Must be a numeric vector. |
.num_sims |
The default is 2000, can be set to anything desired. A warning will pass to the console if the value is less than 2000. |
.proportion |
How much of the original data do you want to pass through to the sampling function. The default is 0.80 (80%) |
.distribution_type |
This can either be 'continuous' or 'discrete' |
Details
This function will take in a numeric input vector and produce a tibble
of bootstrapped values in a list. The table that is output will have two columns:
sim_number and bootstrap_samples
The sim_number corresponds to how many times you want the data to be resampled,
and the bootstrap_samples column contains a list of the boostrapped resampled
data.
Value
A nested tibble
Author(s)
Steven P. Sanderson II, MPH
See Also
Other Bootstrap:
bootstrap_density_augment(),
bootstrap_p_augment(),
bootstrap_p_vec(),
bootstrap_q_augment(),
bootstrap_q_vec(),
bootstrap_stat_plot(),
bootstrap_unnest_tbl()
Examples
x <- mtcars$mpg
tidy_bootstrap(x)