Generates two plots to visualize state assignments for (out-of-sample) state decoding: one with solid colored points (fixed state assignment) and another where point transparency (alpha) is weighted by the decoding probability. The data can be out-of-sample, meaning that they are new data on which the hidden Markov model was not trained.
Arguments
- list_results
An object of class
epiquest_decodingproduced byrun_out_of_sample_decoding().- method
A character string specifying the decoding method to visualize. Must be one of
'filtering'(default),'local', or'global'.A logical. If
TRUE, all generated plots are printed to the active graphics device.
Value
An object of class epiquest_plot_list, a named list of ggplot2 objects containing:
time_series: A ggplot object with points colored by the most likely state.time_series_shaded: A ggplot object similar totime_series, but where point transparency represents state probability (not produced ifmethod = 'global').
Details
Consult run_out_of_sample_decoding for information about the different
decoding options for method. The vertical dotted line marks the last index of the training
data for hmm_frozen. Data points to its right are the new out-of-sample data.
The plots generated by create_hmm_plots() and create_loop_plots() all use 'local'
state assignments.