glmcoeff {BHMSMAfMRI} | R Documentation |
Fits General Linear Model to the time-series corresponding to each voxel in the data and returns the standardized GLM coefficients and their standard error estimates.
glmcoeff(nsubject, grid, Data, DesignMatrix)
nsubject |
Number of subjects included in the analysis. |
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 grid^2. The maximum grid value for this package is 512. |
Data |
The data in form of an array with dimension (nsubject,grid,grid,ntime), where ntime is the size of the time series for each voxel. |
DesignMatrix |
The design matrix used to generate the data. |
A list containing the following.
GLMCoeffStandardized |
An array of dimension (nsubject, grid, grid), containing for each subject the standardized GLM coefficients obtained by fitting GLM to the time-series corresponding to the voxels. |
GLMEstimatedSE |
An array of dimension (nsubject, grid, grid), containing for each subject the estimated standard errors of the GLM coefficients. |
Nilotpal Sanyal <nsanyal@stanford.edu>, Marco Ferreira <marf@vt.edu>
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.
nsubject <- 3 grid <- 8 Data <- array(dim=c(3,8,8,10),rnorm(3*8*8*10)) DesignMatrix <- cbind( c(rep(c(1,0),5)), rep(1,10) ) glm.fit <- glmcoeff(nsubject, grid, Data, DesignMatrix) dim(glm.fit$GLMCoeffStandardized) #[1] 3 8 8