# hmmsim.cont: Simulate a hidden Markov series and its underlying states... In ziphsmm: Zero-Inflated Poisson Hidden (Semi-)Markov Models

## Description

Simulate a hidden Markov series and its underlying states with zero-inflated emission distributions

## Usage

 `1` ```hmmsim.cont(n, M, prior, tpm_parm, emit_parm, zeroprop, timeindex) ```

## Arguments

 `n` length of the simulated series `M` number of hidden states `prior` a vector of prior probability for each state `tpm_parm` transition rate matrix `emit_parm` a vector containing means for each poisson distribution `zeroprop` a vector containing structural zero proportions in each state `timeindex` a vector containing the time points

## Value

simulated series and corresponding states

## References

Walter Zucchini, Iain L. MacDonald, Roland Langrock. Hidden Markov Models for Time Series: An Introduction Using R, Second Edition. Chapman & Hall/CRC

## Examples

 ```1 2 3 4 5 6 7 8``` ```prior_init <- c(0.5,0.2,0.3) emit_init <- c(10,40,70) zero_init <- c(0.5,0,0) omega <- matrix(c(-0.3,0.2,0.1,0.1,-0.2,0.1,0.2,0.2,-0.4),3,3,byrow=TRUE) timeindex <- rep(1,1000) for(i in 2:1000) timeindex[i] <- timeindex[i-1] + sample(1:3,1) result <- hmmsim.cont(n=1000,M=3,prior=prior_init, tpm_parm=omega, emit_parm=emit_init,zeroprop=zero_init,timeindex=timeindex) ```

ziphsmm documentation built on May 2, 2019, 6:10 a.m.