postglmcoeff {BHMSMAfMRI}R Documentation

Obtain the posterior mean of the GLM coefficients using the posterior mean of the wavelet coefficients.

Description

Computes the posterior mean of the GLM coefficients using the posterior mean of the wavelet coefficients by means of inverse discrete wavelet transform.

Usage

postglmcoeff(nsubject, grid, GLMCoeffStandardized, PostMeanWaveletCoeff, 
wave.family="DaubLeAsymm", filter.number=6, bc="periodic")

Arguments

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.

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.

PostMeanWaveletCoeff

A matrix of size (nsubject, grid^2-1), containing for each subject the posterior mean of the wavelet coefficients of all levels stacked together (by the increasing order of resolution level).

wave.family

The family of wavelets to use - "DaubExPhase" or "DaubLeAsymm". Default is "DaubLeAsymm".

filter.number

The number of vanishing moments of the wavelet. By default 6.

bc

The boundary condition to use - "periodic" or "symmetric". Default is "periodic".

Details

The wavelet reconstruction is performed by using R package 'wavethresh'. For details, check wavethresh package help.

Value

A list containing the following.

GLMcoeffposterior

An array of dimension (nsubject, grid, grid), containing for each subject the posterior means of the standardized GLM coefficients.

Author(s)

Nilotpal Sanyal <nsanyal@stanford.edu>, Marco Ferreira <marf@vt.edu>

Examples

nsubject <- 3
grid <- 8
GLMCoeffStandardized <- array(rnorm(3*8*8),dim=c(3,8,8))
PostMeanWaveletCoeff <- array(rnorm(3*63),dim=c(3,63))
postglm.coeff <- postglmcoeff(nsubject, grid, GLMCoeffStandardized, PostMeanWaveletCoeff)
dim(postglm.coeff$GLMcoeffposterior)
#[1] 3 8 8

[Package BHMSMAfMRI version 1.3 Index]