waveletcoef | R Documentation |
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.
waveletcoef(n, grid, glmcoefstd, wave.family="DaubLeAsymm",
filter.number=6, bc="periodic")
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". |
The wavelet decomposition is performed by using the function imwd
.
A list containing the following.
WaveletCoefficientMatrix |
A matrix of dimension |
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
imwd
, hyperparamest
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.