How can I incorporate such function into dynare? I mean, do I have to call it after the estimation is executed or do I have to declare it somewhere else? Is the function you refer to reliable to produce forecast?
Just one more question, I am trying several ways for estimating a DSGE-VAR for forecasting purposes, one of them is fully in dynare, where I try to do as described in the previous comment (i.e. iterating forward at the VAR parameters mode, consider that the dsge_prior_weight turns out to be around 0.8, so not so small). I chose a lag order of 4 (but with 5 or 6 nothing changes) and the point is that the forecast are highly explosive (the order of magnitude is for instance a growth rate of GDP around 10000% after 10 steps ahead). I guess that this is a signal of some issue in the estimation procedure itself.
The point is that my data are not stationary in covariance although they are already first differenced: I have 7 observables (the same as in Smets and Wouters 2007, but for a European country, on a different time span including the two financial crises ) and only 2 out of 7 are stationary. I think that this is the main source of troubles, is that right? Or should I expect that drawing directly from the joint posterior would solve this issue?
Of course, I tried to fit a simpel OLS VAR(4) on the same data (directly on matlab), the forecasts still explode but at far slower and reasonable pace, that is what precisely puzzles me about the dynare outcome (i.e. when I forecast with the VAR parametrized at the DSGE-VAR posterior mode)!
Finally, I already estimated a DSGE a lá SW 2007 with same data and the forecasts are reasonable.
Sorry for having been a bit lengthy, and thank you in advance for your availability.