rpois.hsmm: Random number generation from a Poisson distributed emission...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This generates values from a Poisson distributed emission state j given parameters in model.

Usage

1
rpois.hsmm(j, model)

Arguments

j

An integer representing the state

model

A hmmspec or hsmmspec object

Details

This is essentially a wrapper for rpois. Users may build functions with the same arguments and return values so they can use their own custom emission distributions.

Value

A single value from the emission distribution.

Author(s)

Jared O'Connell jaredoconnell@gmail.com

See Also

mstep.pois, dpois.hsmm

Examples

1
2
3
4
5
6
7
8
9
  J<-3
  initial <- rep(1/J,J)
  P <- matrix(c(.8,.5,.1,0.05,.2,.5,.15,.3,.4),nrow=J)
  b <- list(lambda=c(1,3,6))
  model <- hmmspec(init=initial, trans=P, parms.emission=b,dens.emission=dpois.hsmm)
  model
  train <- simulate(model, nsim=300, seed=1234, rand.emis=rpois.hsmm)
  plot(train,xlim=c(0,100))  
  h1 = hmmfit(train,model,mstep=mstep.pois)

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