VB Algorithm for FC Bayesian brain map
VB_FCBrainMap(
prior_mean,
prior_var,
prior_FC,
method_FC = c("VB1", "VB2"),
nsamp_u = 10000,
CI_FC = 0.95,
return_FC_samp = FALSE,
prior_params = c(0.001, 0.001),
BOLD,
TR = NULL,
A0,
S0,
S0_var,
maxiter = 100,
miniter = 3,
epsilon = 0.001,
usePar = FALSE,
PW = FALSE,
seed = 1234,
verbose = FALSE
)A list of computed values, including the final parameter estimates.
(\(V \times Q\) matrix) mean maps for each network in the prior, where \(Q\) is the number of networks, and \(V=nvox\) is the number of data locations.
(\(V \times Q\) matrix) between-subject variance maps for each network in the prior.
(list) Parameters of functional connectivity prior.
Variational Bayes (VB) method for FC Bayesian brain mapping:
"VB1" (default) uses a conjugate Inverse-Wishart prior for the cor(A);
"VB2" draws samples from p(cor(A)) to emulate the population distribution
using a combination of Cholesky, SVD, and random pivoting.
For VB1, the number of samples to generate from u ~ Gamma, where
A is Gaussian conditional on u. Default: 10000.
Level of posterior credible interval to construct for each FC element.
Default: 0.95.
Should the FC samples (\(QxQxK\)) be returned, where K is the number of posterior samples generated? May be a large object. For VB1, K is equal to nsamp_u. For VB2, K is equal to the number of samples from p(G) contained in prior_FC.
Alpha and beta parameters of IG prior on \(\tau^2\)
(error variance). Default: 0.001 for both.
(\(V \times T\) matrix) preprocessed fMRI data.
Initial guesses at latent variables: A (\(TxQ\)
mixing matrix), S (\(QxV\) matrix of spatial networks), and
variance matrix S0_var.
Maximum number of VB iterations. Default: 100.
Minimum number of VB iterations. Default: 3.
Smallest proportion change in parameter estimates between iterations.
Default: 0.001.
Parallelize the computation? Default: FALSE. Can be the
number of cores to use or TRUE, which will use the number available minus two.
Prewhiten to account for residual autocorrelation? Default: FALSE.
(Only applicable if PW) Seed to use for computing temporal
effective sample size (ESS) to correct sums over \(t\). If NULL,
do not change the seed. Default: 1234.
If TRUE, display progress of algorithm. Default: FALSE.