Plot All Factor Scores (Z) for MFA, Faceted by Cluster and Factor
Source:R/visualization.R
plot_all_factor_scores_mfa.RdThis function computes the factor scores Z_i(t) for each subject i, identifies that subject's cluster k, and then creates a large facet plot of the time evolution of each factor (1..r) in each cluster (1..K). Optionally overlays all subjects in the same cluster.
Usage
plot_all_factor_scores_mfa(
mfa_fit,
list_of_data,
overlay_subjects = TRUE,
muscle_names = NULL
)Arguments
- mfa_fit
A fitted MFA model (with z, Lambda, Psi, mu, etc.).
- list_of_data
A list of (T_i x M) data matrices.
- overlay_subjects
Logical; if TRUE, all subjects in the same cluster are overlaid in the same facet. If FALSE, you could average them, etc.
- muscle_names
Optional character vector of muscle names for y-axis labels. If NULL, default channel names will be used.
Examples
if (FALSE) { # \dontrun{
p <- plot_all_factor_scores_mfa(my_mfa_fit, list_of_data)
print(p)
} # }