Description Usage Arguments Details Value Author(s) References Examples
Convolute a timeseries with any double gamma function.
1 2 3 |
x |
Single timeseries (default = NULL) |
scans |
number of scans |
onsets |
onsets of experimental condition |
durations |
duration of experimental condition |
rt |
repetition time |
SNR |
signal to noise ratio of data |
mean |
logical if mean is TRUE the timeseries is centered around 0. |
a1 |
parameter of the double gamma function |
a2 |
parameter of the double gamma function |
b1 |
parameter of the double gamma function |
b2 |
parameter of the double gamma function |
cc |
parameter of the double gamma function |
The function is an extension of the fmri.stimulus function in the ‘fmri’ pacakge (see ref.). If x = NULL, the to be convolved stimulusfunction can be specified with the parameters 'scans', 'onsets', 'durations', 'rt', and 'SNR'. If x is entered, the timeseries x is convolved and the other parameters need not be specified. The default convolution function is the canonical HRF, but can be altered by changing the parameters of the double gamma function.
returns convolved timeseries. The timeseries is convolved with a mixture of 2 gamma functions (default = canonical HRF).
Bjorn Roelstraete
Polzehl, J. and Tabelow, K. (2007) _fmri: A Package for Analyzing fmri Data_, R News, 7:13-17 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Specify a stimulusfunction without noise and convolve with canonical HRF
hrfConvolve(scans = 240, onsets = c(0,60,120,180), durations = c(30),
rt = 3, SNR = 0)
# Convolve a (part of a) timeseries with a canonical HRF.
hrfConvolve(x=grangerdata[1:100,1])
plot(hrfConvolve(grangerdata[1:100,1]))
# Compare the convolved timeseries with the raw
par(mfrow=c(2,1))
plot(x=semdata[1:100,1])
plot(hrfConvolve(x=semdata[1:100,1]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.