EM Algorithms for Bayesian brain maps
EM_BrainMap.spatial(
prior_mean,
prior_var,
meshes,
BOLD,
theta0,
C_diag,
H,
Hinv,
maxiter = 100,
usePar = FALSE,
epsilon = 0.001,
reduce_dim = TRUE,
verbose = FALSE
)EM_BrainMap.independent(
prior_mean,
prior_var,
BOLD,
theta0,
C_diag,
H,
Hinv,
maxiter = 100,
epsilon = 0.001,
reduce_dim = FALSE,
usePar = FALSE,
verbose
)
A list: theta (list of final parameter estimates), subjNet_mean
(estimates of subject-level networks), subjNet_var (variance of subject-level networks,
for non-spatial model) or subjNet_cov (covariance matrix of subject-level networks,
for spatial model -- note that only diagonal and values for neighbors are
computed), and success (flag indicating convergence (TRUE
) or not
(FALSE
))
(\(V \times Q\) matrix) mean maps for each network in the prior, where \(Q\) is the number of networks, \(V=nvox\) is the number of data locations.
(\(V \times Q\) matrix) between-subject variance maps for each network in prior
NULL
for spatial independence model, otherwise a list of
objects of class "BrainMap_mesh" containing the triangular mesh (see
make_mesh
) for each brain structure.
(\(V \times Q\) matrix) dimension-reduced fMRI data
(list) initial guess at parameter values: A (\(QxQ\) mixing matrix), nu0_sq (residual variance from first level) and (for spatial model only) kappa (SPDE smoothness parameter for each network map)
(\(Qx1\)) diagonal elements of matrix proportional to residual variance.
For dimension reduction of the spatial Bayesian brain map model, which assumes that all networks have the same smoothness parameter, \(\kappa\)
Maximum number of EM iterations. Default: 100.
Parallelize the computation? Default: FALSE
. Can be the
number of cores to use or TRUE
, which will use the number available minus two.
Not yet implemented for spatial Bayesian brain map.
Smallest proportion change between iterations. Default: 0.001.
Reduce the temporal dimension of the data using PCA?
Default: TRUE
for the spatial EM algorithm, and FALSE
for the
independent EM algorithm.
If TRUE
, display progress of algorithm. Default: FALSE
.
EM_BrainMap.spatial
implements the expectation-maximization
(EM) algorithm described in Mejia et al. (2019+) for estimating the
subject-level networks and unknown parameters in the Bayesian brain map
model with spatial priors on subject effects.
In both models, if original fMRI timeseries has covariance \(\sigma^2 I_T\), the prewhitened timeseries achieved by premultiplying by (\(QxT\)) matrix \(H\) from PCA has diagonal covariance \(\sigma^2HH'\), so C_diag is \(diag(HH')\).