create_fmri_model: Create an fmri_model from a Formula

View source: R/fmrilm.R View source: R/fmri_model_utils.R View source: R/fmri_model.R

create_fmri_modelR Documentation

Create an fmri_model from a Formula

Description

This function creates an fmri_model object from a formula, block specification, and dataset. It's a convenience function that combines event and baseline models.

This function creates an fmri_model by combining an event model and a baseline model. If a baseline model is not provided, a default one is created based on the dataset.

Usage

create_fmri_model(
  formula,
  block,
  baseline_model = NULL,
  dataset,
  drop_empty = TRUE,
  durations = 0
)

create_fmri_model(
  formula,
  block,
  baseline_model = NULL,
  dataset,
  drop_empty = TRUE,
  durations = 0
)

Arguments

formula

The model formula for experimental events.

block

The model formula for block structure.

baseline_model

(Optional) A baseline_model object. If NULL, a default baseline model is created.

dataset

An fmri_dataset containing the event table and sampling frame.

drop_empty

Logical. Whether to remove factor levels with zero size. Default is TRUE.

durations

A vector of event durations. Default is 0.

Value

An fmri_model object

An fmri_model object.


bbuchsbaum/fmrireg documentation built on June 10, 2025, 8:18 p.m.