compute_mu_s: Compute posterior mean and precision of s

View source: R/EM_templateICA.R

compute_mu_sR Documentation

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)

Arguments

y_vec

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

D

Sparse diagonal matrix of template 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 ICs.)

C_diag

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

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.


templateICAr documentation built on April 3, 2025, 7:41 p.m.