Problem with Shock Decomposition

I’ve been having a problem with the shock decomposition outcome. In a linear model I’ve estimated, the simulated path for one observed log-deviation variable (out od 13) does not match the actual observed variable, even though I fed it to the system in log-deviation form.
The dynamics od the black full line that comes with the historical shock decomposition is really different from what it was supposd to look like.
Can someone give me some help with that?

Could it be that your model is stochastically singular? In this case, the shocks are unable to fully explain all observed variables.

Thank you for the help!
But I don’t think that’s the case. I’m exactly matching the number of shocks and observables.
If I had stochastically singularity, I guess the effective number of shocks would be smaller than the number of observables and I would not be able to estimate the model, what I actually did.

Could you please upload the picture in question, e.g. via a zip-file?

Hi Johannes,
Sorry for not replying earlier. I was trying to get rid of all possible culprits the last days, like e.g. code typos etc. But it seems I couldn’t figure that out.

So I’m sending 3 figures in this zip file.

The first one (HattedVariables) shows two observed paths for 12-month aggregate sectoral inflation rates (in Brazil), used in a heterogeneous model, already in log-deviation format. Instead of demeaning the series, I discounted the inflation targets instead. In this case, one of the log-deviation series has a clearly positive (sample) mean, even though theoretically the mean should converge to zero if I had a very long sample. I adopted this strategy on purpose, for I want to uncover the shocks that are preventing the means to be closer to zero.

The second and third ones are the standard Dynare shock decomposition pictures for both series. Notice that the black line on the shock decomposition of series PI12_m_ht resembles closely the one descibed by the black line from the first picture (HattedVariables), as expected since it is an observed series.

However, the black line on the shock decomposition of series PI12_s_ht does not resemble are the one descibed by the dotted blue line from the first picture (HattedVariables), even thou it is also another observed series. Actually, the line produced in the shock decomposition picture seems to approach that of PI12_m_ht in the end of the sample.

Again, I double and triple-checked the codes. Each endogenous variable is properly defined, as well as their dynamics equations.

Can you give me a hint?

Sergio (105 KB)

That is strange. Do you have measurement error?

Yes, it is strange!
And no, I don’t have any measurement error…
This result has been really bugging me.

Any tip?


Please provide me with the full files, e.g. via Email.

Hi johannes,
i just sent you an email with the files.