I've been trying to run a threshold vector autoregression (TVAR) model. I need to allow each regime to have a different number of lags. I have tried in matlab using Gabriel Bruneau's toolbox, the tsDyn package in R, and the thsvar add-in in E-views. Neither of which has the option to specify a different number of lags for each regime. I also tried editing the TVAR function in R with no success. Does someone have experience with this kind of models? Thanks!
Asked
Active
Viewed 354 times
0
-
Hi welcome to Stack Overflow. Perhaps you could share the code you've already tried as a reproducible example? – Mark Neal Aug 13 '20 at 01:45
-
Thanks for the reply, my original idea was to modify the existing TVAR function in R. So I had the function take a different number of lags for each regime, my idea was to have each regime specified separately. The problem is that the function then estimates the whole system at once, which is not possible if the dimensions don´t match. Here is a copy of the code… https://docs.google.com/document/d/1pJp61cTiY5TIHOp4mF9HlxZe8yZT62-QfYCsNaHcpX4/edit?usp=sharing I believe it’s too long for someone to check... Thanks again – camilo lopez Aug 14 '20 at 15:14
-
If you look up tsdyn on github, you’ll find an faq and a mailing list that may help you. – Mark Neal Aug 15 '20 at 08:53