Skip to contents

Plot Original vs. Reconstructed Waveform for an MPCA Model

Usage

plot_waveform_comparison_mpca(
  mpca_fit,
  list_of_data,
  subject_id,
  channel = 1,
  muscle_names = NULL
)

Arguments

mpca_fit

A fitted MPCA model with W, mu, z, plus factor_scores.

list_of_data

The original data list used to fit the model.

subject_id

Index of the subject to plot (1-based).

channel

Which channel (1-based) to plot. Defaults to 1.

muscle_names

Optional character vector of muscle names for y-axis labels. If NULL, default channel names will be used.

Value

A ggplot object showing original and reconstructed waveforms.