My question is regarding the unconditional variance decomposition post estimation. In the command window, dynare reports the following table:

VARIANCE DECOMPOSITION (in percent)

I am unsure as to whether I should use the values reported here or those reported in oo_.PosteriorTheoreticalMoments.dsge.VarianceDecomposition.hpdinf.<NAME_OF_THE_ENDOGENOUS_VARIABLE>.<NAME_OF_THE_EXOGENOUS_VARIABLE>. They are wildly different. Any help on the matter would be really appreciated.

Your description is insufficient to provide a conclusive answer. But is seems you are comparing apples and oranges.
The output of the variance decomposition comes from the calibrated model, I guess. The fields you describe seem to come from the model estimation. Those are two completely different things.
On top of that, the HPDI field refers to the upper bound of the credible set (Bayesian confidence interval). Of course the upper bound is different from the mean or median.

I was under the impression that dynare, in the command window, would report variance decomposition for those parameter values evaluated after estimation. However, it is indeed reported for those in the calibration block.
J

I always thought that conditional_variance_decomposition after estimation would automatically considers the posteriors means obtained from estimation. Is this correct ?

If you run stoch_simul after estimation, you will obtain the conditional_variance_decomposition at the posterior mean and the output will be displayed in the command window. But this post referred to someone using stoch_simul BEFORE estimation, while also requesting conditional_variance_decomposition in the estimation command. In this case, there will only be output for the conditional_variance_decomposition from the calibrated model. There will be no output in the command window from the estimation command for the conditional_variance_decomposition as this command, as documented in the the manual, only stores the results in oo_.

Hi Mr Pfeifer
I am writing a paper by using “dsge models” and I have a problem.
could you help me how can I do variance decomposition in dynare? I do not know what code is required and where I should put that…
thank you

Then I will get two types of unconditional variance decomposition results.
The first one displayed in the command window is the unconditional variance decomposition at the posterior mean ;

My quesiton is , how to explain the second type of unconditional variance decomposition stored in oo_.PosteriorTheoreticalMoments.dsge.VarianceDcomposition ? Even though the two types are very close in value.

In published paper, people generally report which type of unconditional variance decomposition?

The main difference is that the stoch_simul variance decomposition is computed at the calibrated parameter combination (here the posterior mean), while the Bayesian variance decomposition is the mean variance decomposition (not to be confused with the variance decomposition at the mean). That is, the latter is the average of the variance decomposition over the parameter draws while the former is the variance decomposition at the average over the parameters.

You can use both. In the context of Bayesian estimation, the ones from the estimation command are theoretically preferable, but most people use the ones from stoch_simul, because they are easier to interpret. For example, Christiano/Motto/Rostagno (2014) in their Risk Shocks paper in the AER do this.

[quote=“jpfeifer”]The main difference is that the stoch_simul variance decomposition is computed at the calibrated parameter combination (here the posterior mean), while the Bayesian variance decomposition is the mean variance decomposition (not to be confused with the variance decomposition at the mean). That is, the latter is the average of the variance decomposition over the parameter draws while the former is the variance decomposition at the average over the parameters.

You can use both. In the context of Bayesian estimation, the ones from the estimation command are theoretically preferable, but most people use the ones from stoch_simul, because they are easier to interpret. For example, Christiano/Motto/Rostagno (2014) in their Risk Shocks paper in the AER do this.[/quote]

Dear Johhanes,

Thank you for your time and patience and professional clear explanation.

Many thanks for your discussion. It’s really helpful. My estimation exercise return significantly difference between variance decomposition using posterior mean and the mean variance decomposition. For instance, I want to look at TFP shock’s explainary power on output and consumption. The bayesian estimation exercise reveals that this shock captures around 50% of output fluctuation. Yet when I check the variance decomposition for calibrated model using posterior mean. the explainary power is reduced to 10%. Is it possible to get such result? And how to understand ?

Thanks Johannes.
But I use the following default setting.

In this case, I do not call HP filter. is it possible to explained the difference? In my previous example, I says that the estimation assign large weight on productivity shock while the simulation returns smaller weight. When I plot the IRF for this productivity shock and other shocks using posterior mean/median. It seems that variance decomposition from simulated version is more reasonable and easier to interpret. I just try to figure out what can result in such inconsistent result.

only for stoch_simul
That might explain the difference.[/quote]

Dear Johannes,

I’m a bit confused. I guess the simulation command and estimation command is similar with your replication on Garcia-Cicco, Pancrazi and Uribe (2010). I put my model into the dynare similar to you. Where I speficy the original model in “model” block and variables are the original variable. In the simulation part, I put the ‘loglinear’ option so that the simulation will be done for loglinearized model. In the estimation block, I specify the ‘logdata’ because the input data is logged. All intereted variables are log-diffrence variables (the growth rate), same as the GPU paper.
Could you elaborate more about the difference?
By checking the variable decomposition from stoch_simul command in your shared file , the results are pretty closed to the Table 5 in the paper. Do it mean that the paper report the variance decomposition based on the simulation?

In my mod-file, there is a stoch_simul(loglinear) before

This implies that the loglinear option is already set when estimation is run. If you don’t do this, the estimation will not be using the loglinear option. I updated the Garcia-Cicco, Pancrazi and Uribe (2010) mod-file to make explicit that you would need to set that option explicitly.