Page 1 of 1

Estimating a state space model

Posted: Tue Oct 26, 2021 7:06 pm
by willmjr
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/sY53mnttTR ... v/?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?

Re: Estimating a state space model

Posted: Tue Oct 26, 2021 8:53 pm
by EViews Glenn
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.