powered by
This function simulates observations from a univariate Gaussian HMM
Sim.HMM.Gaussian.1d(mu, sigma, Q, eta0, n)
Simulated Data
Markov chain regimes
vector of means for each regime (r x 1);
vector of standard deviations for each regime (r x 1);
Transition probality matrix (r x r);
Initial value for the regime;
number of simulated observations.
Bouchra R Nasri and Bruno N Rémillard, January 31, 2019
Q <- matrix(c(0.8, 0.3, 0.2, 0.7),2,2) ; mu <- c(-0.3 ,0.7) ; sigma <- c(0.15,0.05); sim <- Sim.HMM.Gaussian.1d(mu,sigma,Q,eta0=1,n=100)
Run the code above in your browser using DataLab