smoother

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

smoother

Postby srs788 » Wed May 17, 2017 7:45 pm

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
Attachments
smoother_kalman.zip
(28.79 KiB) Downloaded 56 times
srs788
 
Posts: 1
Joined: Wed May 17, 2017 7:29 pm

Re: smoother

Postby jpfeifer » Tue May 23, 2017 10:34 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 12 guests