View source: R/CreateBootstrapSamples.R
Creates bootstrap samples and save them to disk, to use in functions that rely on bootstraping to estimate uncertainty intervals or to come up with other estimators, for example a linear shrinkage factor.
1 2 3 4 |
study.sample |
Data frame. The study sample. No default. |
random.seed.already.set |
Logical vector of length 1. If TRUE random.seed does not need to be set within this function as it indicates that this has been done (which is good practice) earlier in the code. Defaults to FALSE. |
random.seed |
Numeric vector of length 1. Has to be an integer. The seed to use for random number generation. Only used if random.seed.already.set is FALSE. Defaults to NULL. |
number.of.bootstrap.samples |
Numeric vector of length 1. Has to be a positive integer. The number of bootstrap samples to create. Only used it bootstrap.confidence.interval is TRUE. Defaults to 1000. |
strata |
Character vector of length 1 or NULL. The name of the variable on which to stratify the bootstrap, i.e. do the bootstrap separately in each level of the strata variable and then combine the results. If NULL the bootstrap is not stratified. Defaults to NULL. |
create.as.list |
Logical vector of length 1. If TRUE the bootstrap samples are returned or saved as a list. If FALSE the samples are returned as a data.frame. Defaults to TRUE. |
return.samples |
Logical vector of length 1. If TRUE, the function returns bootstrap.samples to parent enviroment. Defaults to FALSE. |
save.to.disk |
Logical vector of length 1. If TRUE, bootstrap.samples are saved to disk in RDS format. Defaults to TRUE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.