sim.hmm0norm {HMMextra0s} | R Documentation |
Simulation of a 1-D HMM with Extra Zeros
Description
Simulates the observed process and the associated binary variable of a 1-D HMM with extra zeros.
Usage
sim.hmm0norm(mu, sig, pie, gamma, delta, nsim = 1, seed = NULL)
Arguments
pie |
is a vector of length |
gamma |
is the transition probability matrix ( |
mu |
is a |
sig |
is a |
delta |
is a vector of length |
nsim |
is an integer, the number of observations to simulate. |
seed |
is the seed for simulation. Default |
Value
x |
is the simulated observed process. |
z |
is the simulated binary data with the value 1 indicating that an event was observed and 0 otherwise. |
mcy |
is the simulated hidden Markov chain. |
Author(s)
Ting Wang
References
Wang, T., Zhuang, J., Obara, K. and Tsuruoka, H. (2016) Hidden Markov Modeling of Sparse Time Series from Non-volcanic Tremor Observations. Journal of the Royal Statistical Society, Series C, Applied Statistics, 66, Part 4, 691-715.
Examples
pie <- c(0.002,0.2,0.4)
gamma <- matrix(c(0.99,0.007,0.003,
0.02,0.97,0.01,
0.04,0.01,0.95),byrow=TRUE, nrow=3)
mu <- matrix(c(0.3,0.7,0.2),nrow=1)
sig <- matrix(c(0.2,0.1,0.1),nrow=1)
delta <- c(1,0,0)
y <- sim.hmm0norm(mu,sig,pie,gamma,delta, nsim=5000)