waveletcoef {BHMSMAfMRI} | R Documentation |
Apply discrete wavelet transform (DWT) to a 2D GLM coefficient map of a regressor
Description
waveletcoef
applies DWT to a 2D GLM coefficient map (e.g., corresponding to a single brain slice) of a regressor for each subject, and returns the wavelet coefficients at all resolution levels. This function wraps around the wavelet transformation function imwd
of the wavethresh package.
Usage
waveletcoef(n, grid, glmcoefstd, wave.family="DaubLeAsymm",
filter.number=6, bc="periodic")
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 |
glmcoefstd |
An array of dimension |
wave.family |
The family of wavelets to use - "DaubExPhase" or "DaubLeAsymm". Default is "DaubLeAsymm". |
filter.number |
The number of vanishing moments of the wavelet. Default is 6. |
bc |
The boundary condition to use - "periodic" or "symmetric". Default is "periodic". |
Details
The wavelet decomposition is performed by using the function imwd
.
Value
A list containing the following.
WaveletCoefficientMatrix |
A matrix of dimension |
Author(s)
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
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)
glmcoefstd <- glm.fit$GLMCoefStandardized[,,,1]
wavecoef <- waveletcoef(n,grid,glmcoefstd)
dim(wavecoef$WaveletCoefficientMatrix)
#[1] 3 63