I try to compare DSGE forecast peformance with VAR and this is my first time using Matlab/Dynare so the Question is hopefully a Basic one.
So I used the model creation of Johannes Pfeifer:
Basicly I got rid of everything non Basic, so the plots as well as everything that splits the data in pre and post 1980.
Now I got two issues I can’t solve,
I added the forecast ; command, and it does plot forecasts, but no variable is saved in the Workspace where I could look at the values.
I get that warning message About the hessian and the initial values but they are set according to the paper, is that an actual issue and Maybe the reason for the NaN in the ML estimation?
I hope somebody is able to help. Anyway thanks in Advance!
The man himself, nice!
There just is no oo_.forecast that I could look at.
I see, sorry I overlooked that. Are the results still valid?
Ps: Really grateful for yout Github page, made getting into Matlab way more interesting as one can learn something about economics while doing so.
ireland2.mod (3.1 KB)
This is the Code I changed, the rest is taken and left original from your GitHub page, should I upload that as well?
I am not sure what you are trying to do here, but I would have expected a
forecast-option in the estimation command.
Oh okay, as I said I’m new to Matlab, sry if it’s something trivial. I checked the dynare Manual on forecasting command. There they just used forecast ; as a simple command just as I did, after the stoch_simul command. Specificly I just want to forecast the observable variables, namely g, pi and r.
Do I have to specify them as gobs, robs and piobs in the estimation command or what is the issue?
Usually when people put an estimation command in their forecasting mod-file, they want to do out of sample forecasts after the end of the estimation sample, given the estimated final smoothed states. For that, we have the
forecast option of the
I’m sorry, I just can’t get it to work, my estimation command looks like this now:
estimation(datafile=data_full_sample,mode_compute=4, forecast= 12, consider_only_observed);
which gives me some forecasts, but I still got no oo_.forecast in the Workspace…
Please provide all files required to replicate the issue. Which version of Dynare are you using?
I use Version 4.5.7. The data is a .dat but I’m not allowed to upload such a file and can only upload two links. But it is also on your GitHub page
ireland2.mod (3.1 KB) 4.m) (140 Bytes)
data_full_sample.m (140 Bytes)
After running your code and entering in the command window
struct with fields:
Mean: [1×1 struct]
HPDinf: [1×1 struct]
HPDsup: [1×1 struct]
Just as it should be
I’m sorry, it did work for me as well now, thank you a lot for the help, the hint to include it into estimation was gold!
One more thing, as mentioned the forecast is done, but it calculates Zero for all values over all periods, that can’t be Right?
You need to delete the last
forecast-command. Given that you did not set any path or initial condition, it starts at the steady state and will overwrite the forecasts from the estimation command.