boot_fast_prep: boot_fast_prep

View source: R/boot_fast.R

boot_fast_prepR Documentation

boot_fast_prep

Description

Prepare the shared objects for the vectorised bootstrap. Called once per search, before any window is evaluated.

Usage

boot_fast_prep(y, boot_n, cor_method, cor_na_use = "everything")

Arguments

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()

Details

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.

Value

a list used by boot_fast_replicates()


dendroTools documentation built on Nov. 23, 2026, 9:07 a.m.