Skip to contents

Given a fitted Mixture PCA model with $P[[k]], $mu[[k]], $sigma2[k], and $pi[k], we compute $$ \sum_{i=1}^{N} \log\Bigl(\sum_{k=1}^{K} \pi_k \prod_{t=1}^{T_i}\mathcal{N}\bigl(x_{i,t}\mid \mu_k,\Sigma_k\bigr)\Bigr) $$ where Sigma_k = W_k * W_k^T + sigma2_k * I. A typical approach is to reconstruct Sigma_k from P[[k]] if needed (or W[[k]]).

Usage

compute_logLik_mpca(list_of_data, mpca_fit)

Arguments

list_of_data

A list of length N, each (T_i x M).

mpca_fit

A fitted Mixture PCA model, containing:

  • P[[k]] or W[[k]] for cluster k,

  • mu[[k]], sigma2[k], pi[k].

Value

A numeric scalar, the total mixture log-likelihood.

Details

We assume each cluster k has Sigma_k = W_k * W_k^T + sigma2_k * I. You must assemble that to call mvtnorm::dmvnorm row by row.