Output Gap and Kalman Filter

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

NicoMillonario
Posts: 1
Joined: Sun Aug 31, 2014 3:14 pm

Output Gap and Kalman Filter

Postby NicoMillonario » 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.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Output Gap and Kalman Filter

Postby trubador » Sun Aug 31, 2014 11:41 pm

What you need to do is called state augmentation. There are plenty of examples in the forum. Here is an excerpt from the manual:

Specification Syntax

State Equations

A state equation contains the “@STATE” keyword followed by a valid state equation specification. Bear in mind that:

• Each equation must have a unique dependent variable name; expressions are not allowed. Since EViews does not automatically create workfile series for the states, you may use the name of an existing (non-series) EViews object.

• State equations may not contain signal equation dependent variables, or leads or lags of these variables.

Each state equation must be linear in the one-period lag of the states. Nonlinearities in the states, or the presence of contemporaneous, lead, or multi-period lag states will generate an error message. We emphasize the point that the one-period lag restriction on states is not restrictive since higher order lags may be written as new state variables. An example of this technique is provided in the example “ARMAX(2, 3) with a Random Coefficient”.

• State equations may contain exogenous variables and unknown coefficients, and may be nonlinear in these elements.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests