Skip to contents

Given the log-likelihood from compute_logLik_mfa, and known K, r, M, N, this function computes BIC = -2 * log(L) + nu * log(N), where nu is the parameter count for the MFA model. The corrected formula is nu = K * (M * r + r * (r-1)/2 + M + M) + (K - 1).

Usage

compute_BIC_mfa(loglik, K, r, M, N_obs)

Arguments

loglik

The total log-likelihood from compute_logLik_mfa.

K

Number of clusters.

r

Factor dimension.

M

Observed dimension (channels).

N_obs

Number of observations (typically sum of all T_i across subjects).

Value

A numeric BIC value.

Details

The parameter count includes:

  • M*r: factor loadings (Lambda)

  • r*(r-1)/2: factor covariances (off-diagonal elements)

  • M: unique variances (diagonal Psi)

  • M: cluster means (mu)

  • K-1: mixing proportions

This corrected formula properly penalizes larger r values, improving r estimation stability.

Note: N_obs should typically be the total number of time points (sum of T_i) rather than the number of subjects, as BIC penalizes based on sample size.