setup_hrf_library | R Documentation |
This function builds or loads a pre-defined "library" of candidate HRFs, then
performs a PCA/truncation to yield a basis set. For instance, if no hrflib
is provided, it uses a range of parameters (h1, h2, h3, h4, f1, f2) to generate
half-cosine-based HRFs via hrf_half_cosine
, calls gen_hrf_library
,
then does a PCA.
setup_hrf_library(hrflib = NULL, rsam = seq(0, 24, by = 1), ncomp = 5)
hrflib |
An optional function that, when given a vector of times, returns
a matrix of candidate HRFs as columns. If |
rsam |
A numeric vector of time points at which HRFs are sampled (default: seq(0,24,1)) |
ncomp |
Number of principal components to keep (default 5) |
A list with elements:
L |
A matrix of HRFs (columns) from the full library |
Lk |
A matrix of dimension |
basis_set |
A list of HRF functions (one for each PC) created by |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.