Output Gap and Kalman Filter
Posted: Sun Aug 31, 2014 3:25 pm
Hi everyone. My name is Nicolás and I´m trying to use the kalman filter in order to estimate the output gap.
I´m using this paper as reference: http://www.rbnz.govt.nz/research_and_pu ... erlach.pdf , but Im not sure which is the correct form to write the state-space representation (p.3).
I wrote this
@signal gdp = sv1 + sv2
@state sv1 = sv1(-1) + sv4(-1) + [var=exp(c(3))]
@state sv2 = c(1)*sv2(-1) + c(2)*sv2(-2) + [var=exp(c(4))]
@state sv2(-1) = sv2(-2)
@state sv4 = sv4(-1) + [var=exp(c(5))]
But the eviews returns this message "Invalid lags or leads for state dependent variable in equation @state sv2(-1) = sv2(-2)". I think that Its incorrect put the sv2 lagged, but I dont know which is the correct form.
Thanks in advance and sorry for my english.
I´m using this paper as reference: http://www.rbnz.govt.nz/research_and_pu ... erlach.pdf , but Im not sure which is the correct form to write the state-space representation (p.3).
I wrote this
@signal gdp = sv1 + sv2
@state sv1 = sv1(-1) + sv4(-1) + [var=exp(c(3))]
@state sv2 = c(1)*sv2(-1) + c(2)*sv2(-2) + [var=exp(c(4))]
@state sv2(-1) = sv2(-2)
@state sv4 = sv4(-1) + [var=exp(c(5))]
But the eviews returns this message "Invalid lags or leads for state dependent variable in equation @state sv2(-1) = sv2(-2)". I think that Its incorrect put the sv2 lagged, but I dont know which is the correct form.
Thanks in advance and sorry for my english.