Estimate hemodynamic response function (HRF) using Generalized Additive Models (GAMs)
Source:R/fmri_betas.R
estimate_hrf.Rd
This function estimates the HRF using GAMs from the mgcv
package.
The HRF can be estimated with or without fixed effects.
Arguments
- form
A formula specifying the event model for the conditions of interest
- fixed
A formula specifying the fixed regressors that model constant effects (i.e., non-varying over trials); default is NULL
- block
A formula specifying the block factor
- dataset
An object representing the fMRI dataset
- bs
Basis function for the smooth term in the GAM; one of "tp" (default), "ts", "cr", or "ps"
- rsam
A sequence of time points at which the HRF is estimated (default: seq(0, 20, by = 1))
- basemod
A
baseline_model
instance to regress out of data before HRF estimation (default: NULL)