Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.ssp

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 ssp object.

...

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)

seqHMM

Mixture Hidden Markov Models for Social Sequence Data and Other Multivariate, Multichannel Categorical Time Series

v1.0.14
GPL (>= 2)
Authors
Jouni Helske [aut, cre] (<https://orcid.org/0000-0001-7130-793X>), Satu Helske [aut] (<https://orcid.org/0000-0003-0532-0153>)
Initial release
2019-10-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.