Description Usage Arguments Details Value Examples
This function simulates observation from a univariate hidden Markov model
1 |
Q |
transition probability matrix; (r x r) |
family |
distribution name; run the function distributions() for help |
theta |
parameters; (r x p) |
n |
number of simulated observations |
graph |
1 for a graph, 0 otherwise (default); only for continuous distributions |
HMM observations simulation
SimData |
Simulated data |
MC |
Simulated Markov chain |
Sim |
Simulated Data for each regime |
1 2 3 4 5 6 7 8 9 10 | family = "gaussian"
Q = matrix(c(0.8, 0.3, 0.2, 0.7), 2, 2) ; theta = matrix(c(-1.5, 1.7, 1, 1),2,2) ;
sim = SimHMMGen(Q, family, theta, 500, 0)
family = "binomial"
size = 5
Q = matrix(c(0.8, 0.3, 0.2, 0.7), 2, 2) ; thetaB = matrix(c(size, size, 0.2, 0.7),2,2) ;
simB = SimHMMGen(Q, family, thetaB, 500, graph=0)$SimData
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.