plot.ssp {seqHMM} | R Documentation |
Stack Multichannel Sequence Plots and/or Most Probable Paths Plots from Hidden Markov Models
Description
Function plot.ssp
plots stacked sequence plots from ssp
objects defined with
ssp
.
Usage
## S3 method for class 'ssp'
plot(x, ...)
Arguments
x |
An |
... |
Ignored. |
References
Helske S. and Helske J. (2019). Mixture Hidden Markov Models for Sequence Data: The seqHMM Package in R, Journal of Statistical Software, 88(3), 1-32. doi:10.18637/jss.v088.i03
See Also
ssp
for more examples and information on defining the plot before using
plot.ssp
; ssplot
for straight plotting of ssp
objects;
and gridplot
for plotting multiple ssp
objects.
Examples
data("biofam3c")
## Building sequence objects
child_seq <- seqdef(biofam3c$children, start = 15)
marr_seq <- seqdef(biofam3c$married, start = 15)
left_seq <- seqdef(biofam3c$left, start = 15)
## Choosing colors
attr(child_seq, "cpal") <- c("#66C2A5", "#FC8D62")
attr(marr_seq, "cpal") <- c("#AB82FF", "#E6AB02", "#E7298A")
attr(left_seq, "cpal") <- c("#A6CEE3", "#E31A1C")
# Plotting state distribution plots of observations
ssp1 <- ssp(list(child_seq, marr_seq, left_seq))
plot(ssp1)
[Package seqHMM version 1.2.6 Index]