Page 1 of 1

Could anyone give me ‍the function 'kf'

PostPosted: Tue Apr 26, 2016 9:36 am
by flye
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!

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

PostPosted: Thu Apr 28, 2016 7:59 am
by jpfeifer
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.

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

PostPosted: Fri Apr 29, 2016 4:56 am
by flye
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.