postwaveletcoef {BHMSMAfMRI} | R Documentation |
Obtain posterior estimates of the BHMSMA wavelet coefficients
Description
postwaveletcoef
computes posterior mean and posterior median of the wavelet coefficients of the BHMSMA model for each subject based on multi-subject or single subject analyses (see References).
Usage
postwaveletcoef(n, grid, waveletcoefmat, hyperparam,
pkljbar, analysis)
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 |
waveletcoefmat |
A matrix of dimension |
hyperparam |
A vector containing the estimates of the six hyperparameters. |
pkljbar |
A matrix of dimension |
analysis |
"MSA" or "SSA", depending on whether performing multi-subject analysis or single subject analysis. |
Value
A list containing the following.
PostMeanWaveletCoef |
A matrix of size |
PostMedianWaveletCoef |
A matrix of size |
Author(s)
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
References
Sanyal, Nilotpal, and Ferreira, Marco A.R. (2012). Bayesian hierarchical multi-subject multiscale analysis of functional MRI data. Neuroimage, 63, 3, 1519-1531.
See Also
waveletcoef
, hyperparamest
, postmixprob
, postglmcoef
Examples
set.seed(1)
n <- 3
grid <- 8
nsample <- 5
waveletcoefmat <- array(rnorm(n*(grid^2-1)),
dim=c(n,grid^2-1))
hyperparam <- rep(.2,6)
pkljbar <- array(runif(n*(grid^2-1)),
dim=c(n,grid^2-1))
analysis <- "multi"
postwavecoef <- postwaveletcoef(n,grid,waveletcoefmat,
hyperparam,pkljbar,analysis)
dim(postwavecoef$PostMeanWaveletCoef)
#[1] 3 63