Skip to content
Prev 11877 / 15274 Next

rcppbugs and markov switching model

Have you thought about trying viterbi first?

There is an example here:
http://www.r-bloggers.com/regime-detection/

If you don't want to use that you can try the example here on about
page page 29:
http://www.rinfinance.com/agenda/2012/talk/WhitArmstrong.pdf

If you decide you want to use mcmc, I think the way to go is to write
the model in c++ and call it with Rcpp.

You should override the random walk classes for bernoulli and use
gibbs within metropolis.

There is an example of that here (for a linear model):
https://github.com/armstrtw/CppBugs/tree/master/test/r.inline.example

If you need some help then feel free to contact me off list.

-Whit
On Wed, Aug 28, 2013 at 9:10 PM, pu chen <chenpuias at gmail.com> wrote: