mlxs_boot() resamples observations from one or more MLX arrays, calls a
user-supplied function on each resampled batch, and returns the collected
results. Every argument supplied via ... must share the same size in its
first dimension (number of observations). Arguments that do not need
resampling should be captured in the environment of fun instead of being
passed through ....
Arguments
- fun
Function called on each bootstrap draw. It must accept the same named arguments as supplied through
....- ...
Arrays, matrices, or vectors that should be resampled along the first dimension before being passed to
fun.- B
Number of bootstrap iterations.
- seed
Optional integer seed for reproducibility.
- progress
Logical; if
TRUE, show a text progress bar.- compile
Logical; compile
funonce viaRmlx::mlx_compile()before entering the resampling loop. Defaults toFALSE.