Hi everybody, I have not worked yet very much with R and must investigate a Monte Carlo Simulation. My model contains an autoregression(1) and a two state markov chain.
For example: X_t = Tau_t + u_t Tau_t = nu_t + Tau_{t-1} nu_t = nu_1 * S_t + nu_0 * (1-S_t) phi(L) u_t = epsilon_t, epsilon_t is i.i.d.(0, sigma^2_epsilon) S_t is the markov switching variable and is either 0 or 1. phi(L) is the first lag of the residuals. I would appreciate to get any hint how to simulate such a model in R . Thank you, Juliane ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.