Perform Chunkwise Linear Modeling on fMRI Dataset
Source:R/fmri_lm_chunkwise.R
chunkwise_lm.fmri_frame.RdThis function performs a chunkwise linear model analysis on an fMRI dataset, splitting the dataset into chunks and running the linear model on each chunk.
Usage
# S3 method for class 'fmri_frame'
chunkwise_lm(
x,
model,
contrast_objects,
nchunks,
cfg,
verbose = FALSE,
use_fast_path = TRUE,
progress = FALSE,
parallel_chunks = FALSE,
phi_fixed = NULL,
sigma_fixed = NULL,
...
)Arguments
- x
An
fmri_frameobject.- model
The
fmri_modelused for the analysis.- contrast_objects
The list of full contrast objects.
- nchunks
The number of chunks to divide the dataset into.
- cfg
An
fmri_lm_controlobject containing all fitting options.- verbose
Logical. Whether to display progress messages (default is
FALSE).- use_fast_path
Logical. If
TRUE, use matrix-based computation for speed. Default isTRUE.- progress
Logical. Display a progress bar for chunk processing. Default is
FALSE.- parallel_chunks
Logical. If
TRUE, process chunks withfuture.apply::future_lapply()using the active future plan.- phi_fixed
Optional fixed AR parameters.
- sigma_fixed
Optional fixed robust scale estimate.