Estimating a state space model

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

willmjr
Posts: 2
Joined: Tue Apr 21, 2020 5:28 pm

Estimating a state space model

Postby willmjr » Tue Oct 26, 2021 7:06 pm

Hi,

I would like to estimate a model that is as similar as possible to a paper (in portuguese): https://www.scielo.br/j/ee/a/sY53mnttTRyM6qqz5TFB9jv/?lang=pt

The model I wrote is:

Code: Select all

' Parameters

@param rho_unemp(1) 1.559616643248347 rho_unemp(2) -0.6659575898354064

@param sigma(1) 0.496804646985957 sigma(2) 0.00235527994917849 sigma(3) 0.0281687861068431 sigma(4) 0.00150687924603913 sigma(5) 0.2 sigma(6) 0.2


' Signals

@signal pi = pi_trend + rho_pi * (pi(-1) - pi_trend1) + lambda * (unemp - unemp_trend) + [ename = e1, var = (sigma(1))^2]

@signal unemp = unemp_trend + rho_unemp(1) * (unemp(-1) - unemp_trend1) + rho_unemp(2) * (unemp(-2) - unemp_trend2) + [ename = e2, var = (sigma(2))^2]


' States

@state pi_trend = pi_trend(-1) + [ename = e3, var = (sigma(3))^2]
@state pi_trend1 = pi_trend(-1)

@state unemp_trend = unemp_trend(-1) + [ename = e4, var = (sigma(4))^2]
@state unemp_trend1 = unemp_trend(-1)
@state unemp_trend2 = unemp_trend1(-1)

@state rho_pi = rho_pi(-1) + [ename = e5, var = (sigma(5))^2]

@state lambda = lambda(-1) + [ename = e6, var = (sigma(6))^2]




THe result is an error message: "Syntax error in equation in equation "@SIGNAL UNEMP =
UNEMP_TREND + RHO_UNEMP(1) * (UNEMP(-1) -
UNEMP_TREND1) + RHO_UNEMP(2) * (UNEMP(-2) -
UNEMP_TREND2) + [ENAME = E2, VAR = (SIGMA(2))^2]".


Any help?
Attachments
model.PNG
model.PNG (52.83 KiB) Viewed 7927 times
data.WF1
(16.21 KiB) Downloaded 104 times

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: Estimating a state space model

Postby EViews Glenn » Tue Oct 26, 2021 8:53 pm

A couple of things.

First, the state space object requires that the parameters exist as coefficients in the workfile. So you'll have to create a RHO_UNEMP and a SIGMA in the workfile at least as large as the number of parameters that you use.

Code: Select all

coef(2) rho_unemp
coef(6) sigma


Second, even after fixing that issue, you'll have a problem as the sspace object doesn't allow current and future signal variables in the signal equations. You'll have to rewrite the system to eliminate the recursion in the PI equation.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 24 guests