Shock_decomposition help expected

I am extending CelsoJoséCostaJunior’s (2016, pp 239-243) model with CO2 emission. During historical shocks decomposition, I am unable to decompose the effects of my (7 shocks). The problem is when I enter more than one shock’s standard error as estimated_params it results in stochastic singularity. With one shock’s std. error it works fine but that is not what I want to have. Can someone please help address this? Are there serious flaws associated with model design? Annual data are log differenced.
dsge_with_gov_new1.mod (13.8 KB)
logDiff.mat (2.1 KB)

The attached files work:
dsge_with_gov_new1.mod (13.8 KB)
logDiff.mat (2.1 KB)

You can clearly see that there is still a problem with the Blanchard-Kahn conditions as there is an oscillating variable and with the observation equations as there is a variable where the mean in the shock decomposition is not zero.

1 Like

Dear jpfeifer,
Thank you for responding. I incorporated your suggestions into the code chunks, and now I can see there is no problem with code execution. I also changed a parameter’s name from ‘beta’ to ‘betta’ plus rhoG = 0. (missing!) to rhoG = 0.9 (in autoregressive shocks parameters). Some doubts:

  1. Why do I still get the influence of only two shocks (e_m and e_t) on the system whilst all other shocks remain silent? Is this due to the issues you pointed out already? or are there serious flaws in my modeling?
  2. Are the issues you pointed out related to (firstly logged and then first-order differenced) data that are stationary but not deseasonalized (thinking that annual series have less chance to become seasonal)?
  3. I understand the logDiff series do not necessarily have zero mean but my model equations demand empirical data that are log deviation from steady states. I went through your papers (, DynareReferenceManual Release5.5, including others) but I am still struggling on my empirical data handling process.
  4. How can I show observed years (instead of periods) along the X-axis on the historical decomposition graph?

Any solutions/suggestions would be greatly appreciated.

dsge_with_gov_new11.mod (15.1 KB)
Empirical_series.xlsx (10.5 KB)
Empirical_series.csv (1.4 KB)

It seems you did not provide the current logDiff.mat you are loading.

  1. See Placing dates on the horizontal axis of shock decomposition - #2 by jpfeifer
1 Like