gen_hrf_lagged: Generate a Lagged HRF Function

View source: R/hrf.R

gen_hrf_laggedR Documentation

Generate a Lagged HRF Function

Description

The gen_hrf_lagged function takes an HRF function and applies a specified lag to it. This can be useful for modeling time-delayed hemodynamic responses.

Usage

gen_hrf_lagged(hrf, lag = 2, normalize = FALSE, ...)

hrf_lagged(hrf, lag = 2, normalize = FALSE, ...)

Arguments

hrf

A function representing the underlying HRF to be shifted.

lag

A numeric value specifying the lag or delay in seconds to apply to the HRF. This can also be a vector of lags, in which case the function returns an HRF set.

normalize

A logical value indicating whether to rescale the output so that the maximum absolute value is 1. Defaults to FALSE.

...

Extra arguments supplied to the hrf function.

Value

A function representing the lagged HRF. If lag is a vector of lags, the function returns an HRF set.

Functions

  • hrf_lagged(): alias for gen_hrf_lagged

See Also

Other gen_hrf: gen_hrf_blocked(), gen_hrf_library(), gen_hrf_set()

Other gen_hrf: gen_hrf_blocked(), gen_hrf_library(), gen_hrf_set()

Examples

hrf_lag5 <- gen_hrf_lagged(HRF_SPMG1, lag=5)
hrf_lag5(0:20)


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