estimate_hrf: Estimate hemodynamic response function (HRF) using...

View source: R/fmri_betas.R

estimate_hrfR Documentation

Estimate hemodynamic response function (HRF) using Generalized Additive Models (GAMs)

Description

This function estimates the HRF using GAMs from the mgcv package. The HRF can be estimated with or without fixed effects.

Usage

estimate_hrf(
  form,
  fixed = NULL,
  block,
  dataset,
  bs = c("tp", "ts", "cr", "ps"),
  rsam = seq(0, 20, by = 1),
  basemod = NULL
)

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)

Value

A matrix with the estimated HRF values for each voxel

See Also

baseline_model, event_model, design_matrix

Examples


# To be added


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.