glmcoef {BHMSMAfMRI} | R Documentation |
Fit GLM (general linear model) to the fMRI time-series of all voxels within a single 2D brain slice
Description
glmcoef
fits a GLM to the fMRI time-series of all voxels within a single 2D brain slice for each subject, and returns standardized GLM coefficients along with their standard error for the included regressors (it does not add any intercept by itself).
Usage
glmcoef(n, grid, data, designmat)
Arguments
n |
Number of subjects. |
grid |
The number of voxels in one row (or, one column) of the brain slice of interest. Must be a power of 2. The total number of voxels is |
data |
The data in the form of an array with dimension |
designmat |
The design matrix used to generate the data. An intercept column should be included unless not desired. |
Value
A list containing the following.
GLMCoefStandardized |
An array of dimension |
GLMCoefSE |
An array of dimension |
Author(s)
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
References
Friston, K.J., Holmes, A.P., Worsley, K.J., Poline, J., Frith, C.D., Frackowiak, R.S.J., 1994. Statistical parametric maps in functional imaging: a general linear approach. Hum. Brain Mapp. 2 (4), 189-210.
See Also
Examples
set.seed(1)
n <- 3
grid <- 8
ntime <- 10
designmat <- cbind(rep(1,10),c(rep(c(1,0),5)))
data <- array(dim=c(n,grid,grid,ntime),
rnorm(n*grid*grid*ntime))
glm.fit <- glmcoef(n,grid,data,designmat)
dim(glm.fit$GLMCoefStandardized)
#[1] 3 8 8