plot.hmm: Plotting Hidden Markov Models.

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plotting Hidden Markov Models.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'hmm'
plot(
  model,
  legend_position = "topright",
  xlab = "Time",
  ylab = "Observed emissions",
  cols = 1:model$m,
  ...
)

Arguments

model

Class hmm model.

legend_position

Position of legend in plots.

xlab

Text for x-axis. Default 'Time'.

ylab

Text for y-axis. Default 'Observed emissions'.

...

Value

Yields four plots stored in a list:

p1 Plot of observed emissions by most likely hidden state (Global)
p2 Plot of observed emissions by most likely hidden state (Local)
p3 Plot of probs. used in Viterbi algorithm (Global)
p4 Plot of state probabilities (Local)

Examples

1
2
3
## Continuation of Earthquake example

plot(hmm.EQ)

AdvancedR-2021/hmm documentation built on Dec. 17, 2021, 7:41 a.m.