Page 1 of 1

kalman filter

Posted: Thu Apr 28, 2016 6:56 am
by ked
please help!
i'm trying to estimate this model based on Harvey and Jaeger (1993) but it doesn't run!!

@signal log(y_cocoa)=trend+cycle+[var=exp(c(2))]
@state trend=trend(-1)+beta+[var=exp(c(3))]
@state beta=beta(-1)+[var=exp(c(4))]
@state cycle=rho*@cos(lamda)*cycle(-1)+rho*@sin(lamda)*cycle_star(-1)+[var=exp(c(5))]
@state cycle_star=rho*@cos(lamda)*cycle_star(-1)-rho*@sin(lamda)*cycle(-1)+[var=exp(c(6))]

you can find the error msg enclosed.

i'm a beginner and i don't know if i've forgotten some details. i need your advice please.

Re: kalman filter

Posted: Fri Apr 29, 2016 2:50 am
by trubador
Make sure the workfile contains rho and lamda objects. If they are coefficients to be estimated with the model, then define them accordingly (i.e. as c(7) and c(8)).
And note that state equation for trend cannot have another contemporaneous state variable (i.e. beta).

Re: kalman filter

Posted: Sat Apr 30, 2016 1:57 pm
by ked
It runs now. you're perfectly right. Thank you very much for your help.