Page 1 of 1

smoother

PostPosted: Wed May 17, 2017 7:45 pm
by srs788
Hi,

I have been trying (with unstable version) to use the Kalman smoother to extract the shocks for a calibrated model. However, depending on different specifications of kalman filter( diffuse versus non-diffuse, sims svd decomposition versus not, etc ) I get drastically different smoothed states and shocks. Is there a way of disciplining the extraction of states?

For illustration, I am attaching the Smets Wouters code, kindly provided by Johannes Pfeifer. The main_run_sw runs the smets wouters code, performs the calib_smoother to extract the states. Then it uses Alejandro Justiniano's kfilter_full to do the smae, and finally uses Iskander Karibzhanov's kalcvf and kalcvs routine (also used in the FRBNY github codes).

Finally compare: compare etahat(1,:), etamat(:,1) and oo_.SmoothedShocks.ea

Re: smoother

PostPosted: Tue May 23, 2017 10:34 am
by jpfeifer
Hi,
I didn't have the time to check exactly where things go wrong, but I don't think your Kalman smoothing outside of Dynare is correct. If you check
Code: Select all
oo_.SmoothedShocks

you will see the shocks are rather like white noise, fluctuating around 0. The output from your other two smoothers show significant trends, suggesting that there is still something wrong, potentially with the way you feed in the respective matrices.