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?
The reason for the warning is described in the notes to the mod-file
Some of the estimated parameters in Ireland are extremely close to the lower bound of 0. This creates problems in the computation of the Hessian at the mode as two-sided numerical derivatives cannot be computed. Ireland (2004) sidesteps this issue by using one-sided derivatives and an individually selected step size. Dynare does not (yet) offer this tailored approach as it is not generic.
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 estimation-command.
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…
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)
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.