Skip to contents

Creates a new HRF object by applying a temporal lag to an existing HRF object.

Usage

lag_hrf(hrf, lag)

Arguments

hrf

The HRF object (of class `HRF`) to lag.

lag

The time lag in seconds to apply. Positive values shift the response later in time.

Value

A new HRF object representing the lagged function.

See also

Other HRF_decorator_functions: block_hrf(), normalise_hrf()

Examples

lagged_spmg1 <- lag_hrf(HRF_SPMG1, 5)
# Evaluate at time 10; equivalent to HRF_SPMG1(10 - 5)
lagged_spmg1(10)
#> [1] 1.753946
HRF_SPMG1(5)
#> [1] 1.753946