Skip to contents

Apply a selector to a collection of resampled designs

Usage

sb_apply_selector_manual(
  X_norm,
  resamples,
  Y,
  selector,
  ...,
  keep_template = TRUE
)

Arguments

X_norm

Normalised design matrix.

resamples

List of matrices returned by sb_resample_groups().

Y

Numeric response.

selector

Variable-selection routine; function or character string. If it is a function, the selector name should be added as the fun.name attribute.

...

Extra arguments passed to the selector.

keep_template

Logical; when TRUE (default) the first column stores the coefficients fitted on X_norm before any resampling. This avoids recomputing the selector on the original data and keeps the baseline fit available for diagnostics.

Value

A numeric matrix of coefficients with one column per resample.