Given a single cluster's parameters (mu, Lambda, Psi) and data X,
this function returns the estimated factor scores.
Details
This follows the standard posterior mean formula in factor analysis: \(\mathrm{E}[Z|X] = (I + \Lambda^T \Psi^{-1} \Lambda)^{-1} \Lambda^T \Psi^{-1} (X - \mu)\).
Examples
if (FALSE) { # \dontrun{
# Suppose we have X (T x M), mu (M), Lambda (M x r), Psi (M x M).
scores <- compute_factor_scores(X, mu, Lambda, Psi)
head(scores)
} # }