Return a design matrix for a linear model with given stimuli and possible polynomial drift terms.
fmri.design(stimulus, order = 2, cef = NULL, verbose = FALSE)
matrix containing expected BOLD repsonse(s) for the linear model as columns
order of the polynomial drift terms
confounding effects
Report more if TRUE
TRUE
design matrix of the linear model
The stimuli given in stimulus are used as first columns in the design matrix.
stimulus
The order of the polynomial drift terms is given by order, which defaults to 2.
order
Confounding effects can be included in a matrix cef.
cef
The polynomials are defined orthogonal to the stimuli given in stimulus.
Polzehl, J. and Tabelow, K.(2007). fmri: A Package for Analyzing fmri Data, R News, 7:13-17 .
fmri.stimulus, fmri.lm
fmri.stimulus
fmri.lm
# NOT RUN { # Example 1 hrf <- fmri.stimulus(107, c(18, 48, 78), 15, 2) z <- fmri.design(hrf, 2) par(mfrow=c(2, 2)) for (i in 1:4) plot(z[, i], type="l") # }
Run the code above in your browser using DataLab