plot.hsmm.data: Plot function for hsmm data

Description Usage Arguments Author(s) See Also Examples

View source: R/plotting_functions.R

Description

Produces a plot of the observed sequences, and displays a coloured bar signifying the hidden states (if available)

Usage

1
2
## S3 method for class 'hsmm.data'
plot(x, ...)

Arguments

x

A hsmm.data object

...

Arguments passed to plot.ts

Author(s)

Jared O'Connell jaredoconnell@gmail.com

See Also

addStates

Examples

1
2
3
4
5
6
7
8
  J<-3
  initial <- rep(1/J,J)
  P <- matrix(c(.8,.5,.1,0.05,.2,.5,.15,.3,.4),nrow=J)
  b <- list(mu=c(-3,0,2),sigma=c(2,1,.5))
  model <- hmmspec(init=initial, trans=P, parms.emission=b, dens.emission=dnorm.hsmm)
  
  train <- simulate(model, nsim=300, seed=1234, rand.emis=rnorm.hsmm)
  plot(train,xlim=c(0,100))

jaredo/mhsmm documentation built on Dec. 6, 2019, 11:07 a.m.