Forecasting with Vintage data

Add the mode_check option to the estimation command. If you are using the most recent unstable version, you can use the

command. See the manual.

[quote]by jpfeifer » Sat Aug 27, 2016 8:52 am

Both can be generated after an estimation run. [/quote]

So I was just asking how can I generate these plots after finishing an estimation run (which estimation command did not include the mode_check option or the trace_plot after it).

Many thanks

You should be able to manually execute something like

global M_ options_ estim_params_ load name_results generate_trace_plots(chain_number)
in the Matlab command window, where chain_number is the number of the MCMC you want to plot. Usually it should be 1. name_results is the results file you need to load.

Dr Pfeifer,

Could you please have a look at the mode_check plots ?? In most of them the vertical lies around the max of the blue Iine.I also have some red dots in 6 out of 36 plots-figuges. Do you think that this mode_compute looks ok for loading it for the next repeated estimation commands?

Much appreciated
Recursive_run_2.rar (152 KB)

Most of them look fine, but for eta you have got a corner solution. That is a problem. Try to find out where this comes from.

Well, ‘eta’ is the elasticity of substitution between domestic and foreign goods. The prior I use for eta is: gamma_pdf, 1.5, 0.75.

Does this look wrong? How should I think the source of this problem??

Many thanks

If your parameter runs to the bound, either change the bound or fix the parameter at this value. But before trying this, try to understand why the data prefer this particular low value.

I see…If I change the prior mean closer to this posterior mean would that help at all?

No, because you would still be at the bound. Only moving the bound would help - or a prior mode that is a lot higher

Excuse me Prof. I have some basic questions in order to fully understand the problem.

  1. What do you mean by saying ‘a corner solution’ ? Do you mean that the estimated mode can not be reached and we should wide the domain-support so we reach it?

  2. So far I am using a gamma_pdf, 1.5, 0.75 with a default support (0,inf). What I see in the mode_check plot, the vertical teal line crosses the x-axis at the 0.5 point. But 0.5 is inside the support domain already, so why do we have to expand the bounds ?? Think I miss something here.

  3. And how to judge-find the point at which we should set the lower bound ?

  4. What is the difference between:

eta, , , ,gamma_pdf,1.5,0.75,1 and

eta, ,1, ,gamma_pdf,1.5,0.75 ??? I am little bit confused here since It looks the same to me.

Much appreciated

Sorry, my mistake. For lower values of eta, the model cannot be solved anymore. You need to find out why this is the case. Is it the steady state? The BK-conditions?

The thing is that model assumes zero steady states. Think I have to look at the BK conditions.

By the way could you please tell me the difference between

eta, , , ,gamma_pdf,1.5,0.75,1 and

eta, ,1, ,gamma_pdf,1.5,0.75 ??

Thank you

The first one uses a generalized distribution, i.e. moves the original support from 0,Inf) to 1, Inf). Therefore, the mode will also be shifted to the right.
The second one uses the standard distribution, but truncates it from below at 1. The mode will thus still be at the same location.

ok, so returning back to my recursive estimations and forecasts calling everytime a different vintage data set. In order to save some time in the estimation process I want to compute the mode in the first estimation and then load it and doing some extras draws in the second, third, forth,… estimations until sample exhausts.

Is it correct if I do the following:

estimation(mode_compute = 6, mh_replic = 500000,nobs=110,.........) for the 1st estimation

estimation(mode_file=Recursive_run_2, load_mh_file, mode_compute = 0, mh_replic = 100000,nobs=111,............) for the second

estimation(mode_file=Recursive_run_2, load_mh_file, mode_compute = 0, mh_replic = 100000,nobs=112,...........) for the third etc. ???

Much appreciated

This is tricky. You actually want to recompute the mode and run a new MCMC, all while starting at the old mode for mode-finding (using a fast Newton-type mode-finder as the updated mode should be close).

Simply starting at the old mode and continuing the old chain will most probably result in large convergence problems.

So,

estimation(mode_compute = 9, mh_replic = 500000,nobs=110,.........)
estimation(mode_file=Recursive_run_2, mode_compute = 4, mh_replic = 500000,nobs=111,............)

estimation(mode_file=Recursive_run_2, mode_compute = 4, mh_replic = 500000,nobs=112,...........) etc.

  1. Is that what you recommend ? the mode_compute followed by the mode_file means that we load previous mode and then continue from there using a different mode-finder?

  2. Keepign commands like that, the 3rd estimation will load the mode from the 1st one and continue upon it, correct? will not use the mode from the 2nd one.

  3. A fast Newton-type mode-finder could be (Sims’s - 4) ??

Much appreciated

1.) Almost, I meant keeping the default the default name of the mode-file. That way the created mode-file will be loaded in each subsequent step.
2.) See 1)
3.) Yes, mode_compute=4 is fine.

You also might want to set the dirname option in the estimation command to prevent previous runs from being overwritten

Thank you for the help and patience.

Do you have any link to share on how ‘dirname’ is used and exactly does, cause I cant find it anywhere.

Thank you

See the manual of the unstable version