Visualizes the sojourn distributions of a hidden semi-Markov model.

plot_hsmm_sojourn_dist(model, maxt = 100, one_panel_per_state = FALSE)

Arguments

model

a hsmm object specifying the model for which the sojourn distributions should be visualized.

maxt

(optional) an integer specifying the upper limit for the x-axis, which is the sojourn length.

one_panel_per_state

(optional) a logical specifying if the sojourn distribution of each state should be displayed in separate vertically stacked panels. Default value is FALSE.

Value

a ggplot object.

Examples

my_model = simple_model plot_hsmm_sojourn_dist(model = my_model)