Skip to contents

Computes total SSE and VAF across all subjects, and optionally by cluster.

Usage

summarize_vaf_sse_mfa(mfa_fit, list_of_data, by_cluster = FALSE)

Arguments

mfa_fit

A fitted MFA model (with z, Lambda, Psi, mu, etc.).

list_of_data

The data list (a list of (T_i x M) matrices).

by_cluster

Logical; if TRUE, returns a data.frame with SSE/VAF per cluster.

Value

If by_cluster=FALSE, returns a named vector with SSE and VAF. If by_cluster=TRUE, returns a data.frame with columns Cluster, SSE, T, SSE_per_time, VAF.