Forecasting in Dynare

Thanks Jpfeifer.

Actually, I have set mh_replic=200,000. Is it not still sufficient?

Here attached the code and data file.

Regards,
data100.xls (21.8 KB)
code.mod (9.11 KB)

With the unstable version, I cannot replicate the issue you report. Could you please try the most recent snapshot.

Dear Jpferfer,

Thanks for your help. With the latest unstable version of dynare, this problem has been fixed.

However, after a long time of running code to do forecasting, dynare shows the error mesage when it seems that the forecasting is going to finish:

Estimation::mcmc: Forecasted variables (mean)
Estimation::mcmc: Forecasted variables (mean), done!
Estimation::mcmc: Forecasted variables (point)
Estimation::mcmc: Forecasted variables (point), done!
Error using error
The message must be specified as either a string or a message structure.

Error in read_variables (line 104)
error([strtrim(var_names_01(dyn_i_01,:)) ’ not found in ’ fullname])

Error in dynare_estimation (line 100)
rawdata =
read_variables(options_.datafile,options_.varobs,],options_.xls_sheet,options_.xls_range);

Error in code (line 523)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 199)
evalin(‘base’,fname) ;

I set in the estimation block as estimation(datafile=data100, mode_compute =4, mh_jscale=0.3,mh_nblocks = 1, mh_replic=200000, nobs=[87:116],forecast=8)y n p_dc pi_c_h r c ;.

Is it related to my data file or anything else? I don’t know which part of my code should be attribute to this problem. Could you help me? You advice is highly appreciated.

Regards,

The attached file runs without problems on my machine. Did you change anything compared to what you posted?

Dear Jp feifer
in fact I have the same problem but I don’ know if it is a bug or another problem?
In fact I have dynare 4.4.3 version.
Could you please guide me about the problem?
Is it a problem on the data which does not match the model ?
I always thank you
article4Tun.mod (5.96 KB)

and this is the data
data2.m (13.6 KB)

Dear Jpfeifer,

With the latest unstable version of dynare, I still got the above problem when doing out of sample forecasting. Here attached the code and data file again. Hope you help me fix it out.

Thanks in advance.

Regards,
code.mod (9.04 KB)
data100.xls (21.8 KB)

Please be more precise. Which of the two problems do you encounter. The one where the data loading does not work of the one with the draws. If the latter, try deleting the files from previous runs (including subfolders) before running the program again. Please report back if this helps.

Dear Jpfeifer,

Sorry for the misunderstanding. My problem is: with the latest unstable version of dynare, after a long time of running code to do forecasting, dynare shows the error mesage when it seems that the forecasting is going to finish:

Estimation::mcmc: Forecasted variables (mean)
Estimation::mcmc: Forecasted variables (mean), done!
Estimation::mcmc: Forecasted variables (point)
Estimation::mcmc: Forecasted variables (point), done!
Error using error
The message must be specified as either a string or a message structure.

Error in read_variables (line 104)
error([strtrim(var_names_01(dyn_i_01,:)) ’ not found in ’ fullname])

Error in dynare_estimation (line 100)
rawdata =
read_variables(options_.datafile,options_.varobs,],options_.xls_sheet,options_.xls_range);

Error in code (line 523)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 199)
evalin(‘base’,fname) ;

I have also tries to run my code in a new file but still got the problem. I am looking forward to your reply.

Regards,

Please provide the log-file. I need to know for which observation this happens. You can see this in the output like

Estimation::mcmc: Details about the MCMC are available in code_106/metropolis\code_mh_history_0.mat#
The 106 says the last run was for nobs=106.

Dear Jpfeifer,

Here attached the log file.

Thanks for your help.

Regards,
log file.pdf (283 KB)

I found the source of the problem. It has been fixed in the unstable version from 04/15/15
dynare_estimation.m (6.93 KB)

After running an estimation and use the forecast option I get two different results related to the forecasting. So this is my question:
What is the difference between mean and point forecast?

Take a look at Pfeifer (2014): An Introduction to Graphs in Dynare at sites.google.com/site/pfeiferecon/Pfeifer_2014_Dynare_graphs.pdf
The point forecast is the forecast that does not take the potential occurrence of future shocks into account:

[quote]The mean forecasts only take the parameter
uncertainty into account, but omit the uncertainty about future shocks. Future shocks are
averaged out/set to 0.[/quote]

[quote]In contrast to the mean forecasts,
the points forecast not only take the parameter uncertainty into account, but also take into
consideration the uncertainty about future shocks.[/quote]