FMRI analysis requires the specification of the design matrix to be used in processing the general linear model.
The design matrix defines the experimental design and the nature of hypothesis testing to be implemented.
The design matrix has one row for each scan and one column for each effect or explanatory variable (regressor or stimulus function).
The design matrix is used in fMRI analysis to specify the basis functions modeling the hemodynamic response function (HRF). It could be based on a single basis function or a set of functions.
Two common basis function models are: (1) a single basis function is used for each explanatory variable; (2) a second time derivative basis functions is added to model (1), for each explanatory variable.
The ‘fmri.nii.gz’ dataset uses two explanatory variable, to take into account the the auditory and the visual stimulations.
The design matrix used in example fmri follows model (2) above, (4 regressors, excluding the intercept).
`cudaMultireg.slice`

includes an additional intercept variable for regression.
Therefore the explanatory variables of interest for brain visualization purposes in Posterior Probability Mapping (PPM) images are variables number 2 and 4. In the code they are referenced as vreg=2 and vreg=4.

The file ‘fmri_design.mat’ used is a data frame with 45 observations on the following 4 explanatory variables: auditory, auditory temporal derivative, visual, and visual temporal derivative.
The file ‘fmri_design.mat’ was generated by the FSL/FEAT tool.
Similar procedures for generating design matrices for fMRI datasets are available in the SPM toolbox (http://www.fil.ion.ucl.ac.uk/spm/).
The package cudaBayesreg, version 10+, uses the FSL format for the design matrices.
The FSL-design file *design.mat* is simply a ASCII textfile with the fields */NumWaves*, */NumPoints*, */PPheights*,
and */Matrix*. Therefore, it may easily edited if required.

*FSL & FreeSurfer Course*, Oxford Centre for Functional Magnetic Resonance Imaging of the Brain (FMRIB), University of Oxford.
(www.fmrib.ox.ac.uk/fsl).
*FSL & FreeSurfer Course*, Oxford Centre for Functional Magnetic Resonance Imaging of the Brain (FMRIB), University of Oxford.

(www.fmrib.ox.ac.uk/fsl).

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.