Skip to contents

A "base" function that does the standard regional analysis pipeline

Usage

run_regional_base(
  model_spec,
  region_mask,
  coalesce_design_vars = FALSE,
  processor = NULL,
  verbose = FALSE,
  compute_performance = model_spec$compute_performance,
  return_predictions = model_spec$return_predictions,
  return_fits = model_spec$return_fits,
  ...
)

Arguments

model_spec

A model specification object.

region_mask

A mask representing different brain regions in either a NeuroVol or NeuroSurface.

coalesce_design_vars

If TRUE, merges design variables into the prediction table (if present).

processor

An optional processor function for each region (ROI).

verbose

If TRUE, prints progress messages.

compute_performance

Logical indicating whether to compute performance metrics (defaults to model_spec$compute_performance).

return_predictions

Logical indicating whether to combine a full prediction table (defaults to model_spec$return_predictions).

return_fits

Logical indicating whether to return the fitted models (defaults to model_spec$return_fits).

...

Additional arguments passed along to mvpa_iterate or other methods.

Value

A regional_mvpa_result object containing:

  • performance_table: A tibble of performance metrics per region

  • prediction_table: A tibble (if return_predictions = TRUE)

  • vol_results: A list of volumetric maps (if compute_performance = TRUE)

  • fits: A list of model fits if return_fits = TRUE

  • model_spec: The original model specification