Learn R Programming

BayesBrainMap (version 0.1.3)

VB_FCBrainMap: VB_FCBrainMap

Description

VB Algorithm for FC Bayesian brain map

Usage

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
)

Value

A list of computed values, including the final parameter estimates.

Arguments

prior_mean

(\(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.

prior_var

(\(V \times Q\) matrix) between-subject variance maps for each network in the prior.

prior_FC

(list) Parameters of functional connectivity prior.

method_FC

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.

nsamp_u

For VB1, the number of samples to generate from u ~ Gamma, where A is Gaussian conditional on u. Default: 10000.

CI_FC

Level of posterior credible interval to construct for each FC element. Default: 0.95.

return_FC_samp

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.

prior_params

Alpha and beta parameters of IG prior on \(\tau^2\) (error variance). Default: 0.001 for both.

BOLD

(\(V \times T\) matrix) preprocessed fMRI data.

A0, S0, S0_var

Initial guesses at latent variables: A (\(TxQ\) mixing matrix), S (\(QxV\) matrix of spatial networks), and variance matrix S0_var.

maxiter

Maximum number of VB iterations. Default: 100.

miniter

Minimum number of VB iterations. Default: 3.

epsilon

Smallest proportion change in parameter estimates between iterations. Default: 0.001.

usePar

Parallelize the computation? Default: FALSE. Can be the number of cores to use or TRUE, which will use the number available minus two.

PW

Prewhiten to account for residual autocorrelation? Default: FALSE.

seed

(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.

verbose

If TRUE, display progress of algorithm. Default: FALSE.