State space model on Eviews

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

JST-fund
Posts: 3
Joined: Mon Jul 10, 2023 1:06 am

State space model on Eviews

Postby JST-fund » Mon Jul 10, 2023 3:55 pm

I am trying to describe the state space model to reproduce the attached model, but I get the following error.
Please let me know how to solve this problem.
Is the type of description of the state space model incorrect?

@SIGNAL Y = C(1)*(Y(-1)-SV3(-1)) + C(2)*(Y(-2)-SV3(-2)) +C(3)/2*(R(-1)-SV1(-1)) + C(3)/2*(R(-2)-SV1(-2)) + (SV3(-1) +SV4(-1))/100
@SIGNAL pi = c(4)*pi(-1) + c(5)/3*pi(-2) + c(2)/3*pi(-3) + c(2)/3*pi(-4) + (1-c(4)-c(5))/4*pi(-5) + (1-c(4)-c(5))/4*pi(-6) + (1-c(4)-c(5))/4*pi(-7) + (1-c(4)-c(5))/4*pi(-8)

@STATE sv2 = sv2(-1) + [var = exp(c(8))]
@STATE sv4 = sv4(-1) + [var = exp(c(10))]
@STATE sv1 = sv4(-1) + sv2(-1) + [var = exp(c(11))]
@STATE sv3 = sv3(-1) + sv4(-1) + [var = exp(c(9))]
Attachments
image.docx
(170.96 KiB) Downloaded 92 times

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

Re: State space model on Eviews

Postby EViews Glenn » Mon Jul 10, 2023 6:09 pm

Just looking at the spec in your post I note that a problem arises since you can't have lagged state variables in the signal equation. To include the desired lags, you will have to create new states which correspond to the lags of the states you have already specified.

That said I think you can respecify so that the first lags of states are contemporaneous. This would mean you'll only have to handle the higher orders.

JST-fund
Posts: 3
Joined: Mon Jul 10, 2023 1:06 am

Re: State space model on Eviews

Postby JST-fund » Wed Jul 12, 2023 4:50 am

Thanks to your advise, I can solve this problem.

But another issue has come.
We got an error message after setting intitial variables.
"Near singular matrix"

We will send you the work files.
I thought there were no more errors, but I am very troubled.
Could you please advise me on this task?

*****
@SIGNAL 100*Y = C(1)*(Y(-1)-SV3_1) + C(2)*(Y(-2)-SV3_2) + C(3)/2*(r(-1)-SV1_1)+C(3)/2*(r(-2)-SV1_2)+100*SV3
@signal pi = c(4)*pi(-1)+c(5)/3*pi(-2)+c(5)/3*pi(-3)+c(5)/3*pi(-4)+(1-c(4)-c(5))/4*pi(-5)+(1-c(4)-c(5))/4*pi(-6)+(1-c(4)-c(5))/4*pi(-7)+(1-c(4)-c(5))/4*pi(-8)

@state sv2 = sv2(-1) +[var = exp(c(8))]
@state sv4 = sv4(-1) + [var = exp(c(10))]
@state sv1 = sv4(-1) + sv2(-1) + [var = exp(c(11))]
@state sv1_1 = sv1(-1)
@state sv3_1 = sv3(-1)
@state sv3_2 = sv3_1(-1)
@state sv1_2 = sv1_1(-1)
@state sv3 = sv3(-1)+sv4(-1)+[var = exp(c(9))]

@mprior svec0
@vprior svar0
*****
Attachments
data0712.wf1
(40.41 KiB) Downloaded 83 times

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

Re: State space model on Eviews

Postby EViews Glenn » Thu Aug 31, 2023 2:17 pm

We normally don't debug state-space specifications unless there is a bug, because we don't want to be in the position of offering other than cursory econometric or economic advice. I was however, in the midst of a quick browse of the forum, saw this question, and thought I'd take a quick look.

I think that the second signal equation in your specification is problematic. It is an identity that neither includes state variables nor any coefficients that are in the rest of the system. It is completely self-contained and has no error term. I am not sure whether this is intended or not, but it looks as though that combination of features causes estimation to fail. Deleting the second signal equation and playing around with the starting values produces converged estimates for the remaining parameters, though some of the state error variance estimates look suspect.

If the second signal equation should be relevant in your specification, you may want to double-check your parameterization.

Hope this helps.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 20 guests