Counterfactual simulations based on smoothed shocks

Hey Johannes,
First of all, thanks a lot for taking the time to read my “complaint” and for suggesting a solution.
It seems to be working now! But I am curious as to what was the issue.

I went carefully over your file, and everything coincides with what I was doing from line 118 onwards.
The only difference (the only change I made to my code) is that I added the “smoother” option to “estimation”. Now, instead of oo_.SmoothedVariables being a structure of the kind oo_.SmoothedVariables.(varnames), it is of the kind oo_.SmoothedVariables.(yyy) where
(yyy) = {Mean, Median, Var, deciles, HPDInf, HPDSup}
and each of these in turn is of the type oo_.SmoothedVariables.(yyy).(varnames). To obtain the results that match exactly, I am using the Mean for both SmoothedVariables and SmoothedShocks.

I am very happy that this got solved, but out of curiosity, would you mind explaining what the difference is with respect to what I was doing?
I guess my question can be reframed as follows: if I do not specify the “smoother” option when estimating the model, Dynare still generates a sequence of oo_.SmoothedVariables and oo_.SmoothedShocks, where the former coincide with the data exactly for the observables. But what are these objects, exactly?

Thanks again!