hrf
hrf
is an R package for modeling the hemodynamic
response function (HRF). It also includes functions for constructing a
design matrix for a general linear model (GLM), and for comparing
multiple GLMs with different design matrices.
# Read in data.
events <- read.csv("../tests/data/motor1-events.tsv", sep="\t")
# Convert 3-col data.frame to list of 2-col data.frames
events$trial_type <- as.factor(events$trial_type)
trials <- levels(events$trial_type)
events <- setNames(lapply(
trials,
function(x){events[events$trial_type==x,seq(2)]}
), trials)
## Maximum corr.: 0.17
## Maximum VIF: 1.171
## ====BfMRI_design =======================
## Fields: LFoot, LHand, RFoot, RHand, Tongue
## ----------------------------------------