Page 1 of 1

Need some clarifications on Dynare estimation!

PostPosted: Tue Aug 26, 2014 4:22 pm
by Econbee
Dear all,

I have the following questions on Dynare estimation. I searched the manual and the forum but could not get clear answers. These seemingly trivial points do bother me. Hopefully you could provide me some clarifications.

1. Regarding forecasting, when I specify "forecast=n" in the estimation command, I got n+1 numbers in "oo_.MeanForecast.Mean.variablename" and "oo_.PointForecast.Mean.variablename" but not n numbers. Then I tried to set "mh_replic=0" and "forecast=n". This time I only got "oo_.forecast.Mean.variablename" and the forecast has n values. Why does this happen?

2. Regarding variance decomposition, I know if I specify "conditional_variance_decomposition=[]" in the estimation command, the results are stored in "oo_.PosteriorTheoreticalMoments.dsge.ConditionalVarianceDecomposition". My question is what is "oo_.PosteriorTheoreticalMoments.dsge.VarianceDecomposition"?

3. In the graph for "oo_.MeanForecast" and "oo_.PointForecast", I got a black line and several green lines. For example, please see the attached graph. What are they? It seems that green lines represent the Bayesian confidence interval, but why do I only get a few green lines, given that I have 200000 draws in the MCMC? Is the black line the mean of the forecast distribution? or the forecast based on the mean of the parameter distribution?

4. When I run "internals --display-mh-history filename", I got the following error
==============================================
MCMC set-up for filename mod file
==============================================


MCMC chain number 1:
--------------------

o Number of MCMC files is 28
o Number of draws is 200000
o Overall acceptance ratio is 35.02%
o Initial value of the posterior kernel is: -366.44003
o Last value of the posterior kernel is: -364.56578
o State of the chain:

Error using cat
Dimensions of matrices being concatenated are not consistent.
Error in cell2mat (line 84)
m{n} = cat(1,c{:,n});
Error in internals (line 140)
c1 = char(' ', repmat('+',1,size(cell2mat(names),2)), cell2mat(names));

In fact, the struct "record" in "filename_mh_history_0" contains everything. But error occurs during printing on the screen, especially for the second chain. Is this a bug?

5. For the option "sub_draws=INTEGER", the manual says the default is "min(1200, 0.25*Total number of draws)". I think "sub_draw" is the number of draws in the thinned chain. But if 1200 < 0.25*Total number of draws and 1200 is chosen as the value of sub_draws, and if the original number of draws cannot be divided exactly by 1200, how would Dynare deal with this? For example, if there are 2400 draws in the chain, then finally a draw is retained for every 2 draws. But what if there are 2500 draws in the original chain?

Any clarifications are deeply appreciated!

Re: Need some clarifications on Dynare estimation!

PostPosted: Wed Aug 27, 2014 8:22 pm
by jpfeifer
1. This must be a bug because two different parts of code are used when the MCMC is run compared to when it is not run. In the one case the initial period is included and in the other one it is not. We should fix this. Thanks for pointing out the inconsistency.

2. As the manual says:
VarianceDecomposition
Decomposition of variance (unconditional variance, i.e. at horizon infinity)

It is not conditional.

3. Please see Pfeifer (2014): An Introduction to Graphs in Dynare at https://sites.google.com/site/pfeiferecon/dynare

4.This is a bug. You can use the attached bugfixed files to make it work.

5. sub_draws does not specify a thinning parameter (like "take every 10th draw") but the size of a random subsample of the total draws. Hence, it's not necessary to be a divisor of the draw size.

Re: Need some clarifications on Dynare estimation!

PostPosted: Thu Aug 28, 2014 1:28 am
by Econbee
Thanks very much for your clarifications and the attached bugfixed file, Dear Johannes! Those really help!