View source: R/empirical-tidy-bootstrap.R
tidy_bootstrap | R Documentation |
Takes an input vector of numeric data and produces a bootstrapped nested tibble by simulation number.
tidy_bootstrap(
.x,
.num_sims = 2000,
.proportion = 0.8,
.distribution_type = "continuous"
)
.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' |
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.
A nested tibble
Steven P. Sanderson II, MPH
Other Bootstrap:
bootstrap_density_augment()
,
bootstrap_p_augment()
,
bootstrap_p_vec()
,
bootstrap_q_augment()
,
bootstrap_q_vec()
,
bootstrap_stat_plot()
,
bootstrap_unnest_tbl()
x <- mtcars$mpg
tidy_bootstrap(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.