hyperparamest | R Documentation |
hyperparamest
computes the MLEs (maximum likelihood estimates) of the hyperparameters of the BHMSMA model using an empirical Bayes approach for multi-subject or single subject analyses, and returns the hyperparameters estimates along with their covariance matrix estimate (see References).
hyperparamest(n, grid, waveletcoefmat, analysis)
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 |
analysis |
"multi" or "single", depending on whether performing multi-subject analysis or single subject analysis. |
A list containing the following.
hyperparam |
A vector containing the estimates of the six hyperparameters of the BHMSMA model. |
hyperparamVar |
Estimated covariance matrix of the hyperparameters. |
Nilotpal Sanyal, Marco Ferreira
Maintainer: Nilotpal Sanyal <nilotpal.sanyal@gmail.com>
Sanyal, Nilotpal, and Ferreira, Marco A.R. (2012). Bayesian hierarchical multi-subject multiscale analysis of functional MRI data. Neuroimage, 63, 3, 1519-1531.
waveletcoef
, nlminb
, postmixprob
set.seed(1)
n <- 3
grid <- 8
waveletcoefmat <- array(dim=c(n,grid^2-1),
rnorm(n*(grid^2-1)))
analysis <- "multi"
hyperest <- hyperparamest(n,grid,waveletcoefmat,analysis)
hyperest$hyperparam
# [1] 1.00000 1.00000 1.00000 1.00000 0.00000 28.37678
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.