Skip to contents

Calls write_results() on the fitted model, keying the output filenames by the job's meta (subject, task, space). Returns the vector of created file paths. This is the default reducer for large studies: workers write compact statistical maps that group_data() / fmri_meta() can pick up for the group level.

Usage

reduce_write_results(
  format = c("h5", "nifti", "gds"),
  stats = c("beta", "tstat"),
  contrasts = NULL,
  path = NULL,
  desc = "GLM",
  overwrite = FALSE
)

Arguments

format

Output format passed to write_results().

stats

Which contrast statistics to write (mapped to contrast_stats).

contrasts

Optional restriction to specific contrasts.

path

Output directory (passed to write_results()).

desc

BIDS desc- label.

overwrite

Overwrite existing files.

Value

A reducer function suitable for fmri_template().

Note

write_results() requires BIDS entities: each job's meta should carry subject (defaults to the job id), task, and space. A missing task/space surfaces as an error when the reducer runs.