| boot_fast_prep | R Documentation |
Prepare the shared objects for the vectorised bootstrap. Called once per search, before any window is evaluated.
boot_fast_prep(y, boot_n, cor_method, cor_na_use = "everything")
y |
numeric vector, the response (chronology) values |
boot_n |
number of bootstrap replicates |
cor_method |
"pearson", "spearman" or "kendall" |
cor_na_use |
the missing-value rule, as passed to stats::cor() |
The bootstrap is rewritten as matrix algebra. If C[i, r] counts how many times observation i was drawn into resample r, then every sum required by a correlation is a weighted sum over the original observations, and the whole set of replicates becomes one matrix product. Quantities that depend only on the response are computed here and reused for every window.
a list used by boot_fast_replicates()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.