Learn R Programming

BayesBrainMap (version 0.1.3)

compute_mu_s: Compute posterior mean and precision of s

Description

Compute posterior mean and precision matrix of s

Usage

compute_mu_s(y_vec, D, Dinv_s0, R_inv, theta, P, C_diag)

Value

A list containing the posterior mean \(\mu\) (mu) and precision \(\Omega\) (Omega) of s=(s1,...,sQ), along with the supporting vector m, where \(\mu = \Omega^{-1}m\).

Arguments

y_vec

Vectorized, dimension-reduced fMRI data, grouped by locations. A vector of length \(QV\).

D

Sparse diagonal matrix of prior standard deviations

Dinv_s0

The inverse of D times s0_vec

R_inv

Estimate of inverse spatial correlation matrix (sparse)

theta

List of current parameter estimates

P

Permutation matrix for regrouping by locations (instead of by networks.)

C_diag

Diagonals of residual covariance of the first level model. A vector of length \(Q\).