Using R to Estimate a Finite Mixture Model with a Basic Markov Process

My apologies if this is more of a statistical question than an R question. I am trying to evaluate the following model in R.

y_t = mu0 (1 - S_t) + mu1 S_t + e_t e_t ~ N (0, sigma_t ^ 2) sigma_t ^ 2 = sigma_0 ^ 2 (1 - S_t) + sigma_1 ^ 2 S_t

where mu_t = mu0, if S_t = 0, mu_t = mu1, if S_t = 1, and S_t is a Markov process, either 0 or 1, with transition probabilities P (S_t = 1 | S_t-1 = 1) = p and P (S_t = 0 | S_t-1 = 0) = q.

Would "flexmix" be a good library for this? I'm new to stats like this, so any pointer to the library you want would be appreciated.

Thanks,

+2


a source to share


1 answer


It looks like the exact type of model that you could easily copy in Bugs or Jags . Bugs / Jags is probably the most flexible approach to evaluating custom models in R. You can easily navigate between R and Jags using R2Jags .



If you are new to Bayesian models it may take a little to get up to speed.

+3


a source







All Articles