fmri_rlm | R Documentation |
This function fits a robust linear regression model for fMRI data analysis using the specified model formula, block structure, and dataset. The model can be fit using either a runwise or chunkwise data splitting strategy.
fmri_rlm(
formula,
block,
baseline_model = NULL,
dataset,
durations = 0,
drop_empty = TRUE,
strategy = c("runwise", "chunkwise"),
nchunks = 10,
meta_weighting = c("inv_var", "equal"),
...
)
formula |
The model formula for experimental events. |
block |
The model formula for block structure. |
baseline_model |
(Optional) A |
dataset |
An |
durations |
A vector of event durations. Default is |
drop_empty |
Logical. Whether to remove factor levels with zero size. Default is |
strategy |
The data splitting strategy, either |
nchunks |
Number of data chunks when strategy is "chunkwise". Default is 10. |
meta_weighting |
Method for combining results across runs/chunks. Either "inv_var" for inverse variance weighting or "equal" for equal weighting. Default is "inv_var". |
... |
Additional arguments. |
A fitted robust linear regression model for fMRI data analysis.
etab <- data.frame(onset=c(1,30,15,25), fac=factor(c("A", "B", "A", "B")), run=c(1,1,2,2))
etab2 <- data.frame(onset=c(1,30,65,75), fac=factor(c("A", "B", "A", "B")), run=c(1,1,1,1))
mat <- matrix(rnorm(100*100), 100,100)
dset <- matrix_dataset(mat, TR=1, run_length=c(50,50),event_table=etab)
dset2 <- matrix_dataset(mat, TR=1, run_length=c(100),event_table=etab2)
lm.1 <- fmri_rlm(onset ~ hrf(fac), block= ~ run, dataset=dset)
lm.2 <- fmri_rlm(onset ~ hrf(fac), block= ~ run, dataset=dset2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.