Could anyone give me ‍the function 'kf'

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.

Could anyone give me ‍the function 'kf'

Postby flye » Tue Apr 26, 2016 9:36 am

Dear all,
I am trying to run the codes of the paper " The effects of monetary policy news and surprises " by Milani and Treadwell (2012), but got the following error:

Undefined function 'kf' for input arguments of type 'double'.

Error in likelihood_RE_ALL (line 887)
[shatnew,signew,lh]=kf(data(it,:)',H,S0,P0,F,G);

Error in MH_RE_ALL (line 78)
[loglike,S]=likelihood_RE_ALL(data,theta);

Could anyone give me ‍the function 'kf' and some guidance?
Thank you very much!
flye
 
Posts: 2
Joined: Fri Oct 23, 2015 9:11 am

Re: Could anyone give me ‍the function 'kf'

Postby jpfeifer » Thu Apr 28, 2016 7:59 am

That seems to be a Kalman Filter function. Hard to tell what the original function was. The closest to this seems to be the one in the replication file of Justiniano/Primiceri/Tambalotti (2013) in the AEJ Macro. It is attached.
Attachments
kf.m
(1.39 KiB) Downloaded 78 times
------------
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

Re: Could anyone give me ‍the function 'kf'

Postby flye » Fri Apr 29, 2016 4:56 am

Dear Pfeifer,

Thank you for the reply. The function 'kf' you gave me can work very well.

Once again, thank you very much for your help.
flye
 
Posts: 2
Joined: Fri Oct 23, 2015 9:11 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 15 guests