Hi team,
I am trying to write a state space model. Its showing syntax error in signal y but couldnt locate any mistake . Please help me out with this E-view team.
I am building a model based on this paper. http://www.bde.es/f/webbde/Secciones/Pu ... t0416e.pdf
@signal y = a(1) * y(-1) + a(2) * y(-2) + a(3) * r(-1) + a(4) * r(-2) + SV1 - a(1) * SV1(-1) - a(2) * SV1(-2) - a(3) * SV2(-1) - a(4) * SV2(-2) + [var=exp(c(1))]
@signal p = B(4) * y(-1) + (1-3*(b(2))-3*(b(3)) * p(-1) + b(2) * p(-2) + b(2) * p(-3) + b(2) * p(-4) + b(3) * p(-5) + b(3) * p (-6) + b(3) * p(-7) + b(3) * p(-8) - b(5) * SV1(-1) + [var=exp(c(2))]
@state SV2 = d(1) * SV3 +SV4
@state SV4 = e(1) * SV4(-1) + e(2) * SV4(-2) + [var= exp(c(3))]
@state SV1 = SV1(-1) + SV3(-1) + [Var=exp(c(4))]
@state SV3 = SV3(-1) + [Var=exp(c(5))]
Best Regards
Innagt
Syntax error
Moderators: EViews Gareth, EViews Moderator
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Syntax error
unclosed parenthesis?Hi team,
I am trying to write a state space model. Its showing syntax error in signal y but couldnt locate any mistake . Please help me out with this E-view team.
@signal p = B(4) * y(-1) + (1-3*(b(2))-3*(b(3)) * p(-1) + b(2) * p(-2) + b(2) * p(-3) + b(2) * p(-4) + b(3) * p(-5) + b(3) * p (-6) + b(3) * p(-7) + b(3) *
............................. ^
Re: Syntax error
Hi Startz,
Its not showing parenthesis problem. error is "Syntax error in equation in equation". Could you please help me on writing this code. I am damn struck.
Would be very thankful
Best regards
INNAGT
Its not showing parenthesis problem. error is "Syntax error in equation in equation". Could you please help me on writing this code. I am damn struck.
Would be very thankful
Best regards
INNAGT
Re: Syntax error
Please clarify whether this problem is happening because I am restricting co-efficients. If you see the equation my y(-1) and SV(-1) has same co efficient.
Same I have done in Equation two also. Is it because of this I am facing problem? or else i couldn't identify what is causing problem.
Please help.
Same I have done in Equation two also. Is it because of this I am facing problem? or else i couldn't identify what is causing problem.
Please help.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Syntax error
Do you have the same number of open and close parentheses?
Re: Syntax error
yes, parenthesis are matching. The error I am getting is here Syntax error in equation in equation "y = a(1) * y(-1) + a(2) * y(-2) + a(3) * r(-1) + a(4) * r(-2) + SV1 - a(1) * SV1(-1) - a(2) * SV1(-2) - a(3) * SV2(-1) - a(4) * SV2(-2) + [var=exp(c(1))]".
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Syntax error
You don't have A defined in your workfile.
Re: Syntax error
Hi Gareth,
Thanks for your reply. I have re -written my code. still its showing error as Signal variable not allowed in state equatio, but then i changed my code by directly adding lag in signal equation, even then it is not working.
Please please help me out on correcting this code. Couldn't locate what is the prob.
@signal y = c(1)*y2 + c(2)*y3 + c(3)*r1 + c(4)*r2 + c(5)*SV1 - c(1)*SV2 - c(2)*SV3 - c(3)*SV4 - c(4)*SV5 - c(5)*SV6 + [var=exp(c(20))]
@signal p = c(6)*y2 + (1-3*(c(7))-3*(c(8)))*p2 + c(8)*p3 + c(8)*p4 + c(8)*p4 + c(9)*p5 + c(9)*p6 + c(9)*p7 + c(9)*p8 + [var=exp(c(21))]
@state y2 = y(-1)
@state y3 = y(-2)
@state r1 = r(-1)
@state r2 = r(-2)
@state SV1 = SV1(-1) + SV7(-1) + [Var=exp(c(22))]
@state SV2 = SV1(-1)
@state SV3 = SV1(-2)
@state SV4 = c(10)*SV7 + SV9 + [var= exp(c(23))]
@state SV5 = SV4(-1)
@state SV6 = SV4(-2)
@state p2 = p(-1)
@state p3 = p(-2)
@state p4 = p(-3)
@state p5 = p(-4)
@state p6 = p(-5)
@state p7 = p(-6)
@state p8 = p(-7)
@state p9 = p(-8)
@state SV7 = SV7(-1) + [Var=exp(c(24))]
@state SV9 = SV9(-1) + SV9(-2) + [Var=exp(c(25))]
Please help me correcting this. Thanks in advance
Thanks for your reply. I have re -written my code. still its showing error as Signal variable not allowed in state equatio, but then i changed my code by directly adding lag in signal equation, even then it is not working.
Please please help me out on correcting this code. Couldn't locate what is the prob.
@signal y = c(1)*y2 + c(2)*y3 + c(3)*r1 + c(4)*r2 + c(5)*SV1 - c(1)*SV2 - c(2)*SV3 - c(3)*SV4 - c(4)*SV5 - c(5)*SV6 + [var=exp(c(20))]
@signal p = c(6)*y2 + (1-3*(c(7))-3*(c(8)))*p2 + c(8)*p3 + c(8)*p4 + c(8)*p4 + c(9)*p5 + c(9)*p6 + c(9)*p7 + c(9)*p8 + [var=exp(c(21))]
@state y2 = y(-1)
@state y3 = y(-2)
@state r1 = r(-1)
@state r2 = r(-2)
@state SV1 = SV1(-1) + SV7(-1) + [Var=exp(c(22))]
@state SV2 = SV1(-1)
@state SV3 = SV1(-2)
@state SV4 = c(10)*SV7 + SV9 + [var= exp(c(23))]
@state SV5 = SV4(-1)
@state SV6 = SV4(-2)
@state p2 = p(-1)
@state p3 = p(-2)
@state p4 = p(-3)
@state p5 = p(-4)
@state p6 = p(-5)
@state p7 = p(-6)
@state p8 = p(-7)
@state p9 = p(-8)
@state SV7 = SV7(-1) + [Var=exp(c(24))]
@state SV9 = SV9(-1) + SV9(-2) + [Var=exp(c(25))]
Please help me correcting this. Thanks in advance
- Attachments
-
- interest rate.wf1
- (16.33 KiB) Downloaded 237 times
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Syntax error
From the Help system
• State equations may not contain signal equation dependent variables, or leads or lags of these variables.
Re: Syntax error
Hi Startz,
Thanks for reply. I re wrote my code by removing the specifications y1 and y2 as it was in my previous post and added lags directly into the Signal equation.
Now the problem is with my SV4. what is wrong with my SV4 specification?. My SV4 represents this equation r*t = c g(t)+ z (t), where that the natural rate of interest (r*t ) depends only on real factors, specifically the trend growth in the economy (gt) and a series of random factors, which are denoted by the variable zt, which in turn follows a stochastic process determined by equation (4).
Please help, I am badly struck.
@signal y = c(1)*y(-1) + c(2)*y(-2) + c(3)*r1 + c(4)*r2 + c(5)*SV1 - c(1)*SV2 - c(2)*SV3 - c(3)*SV4 - c(4)*SV5 - c(5)*SV6 + [var=exp(c(20))]
@signal p = c(6)*y(-1) + (1-3*(c(7))-3*(c(8)))*p2 + c(8)*p3 + c(8)*p4 + c(8)*p4 + c(9)*p5 + c(9)*p6 + c(9)*p7 + c(9)*p8 + [var=exp(c(21))]
@state r1 = r(-1)
@state r2 = r(-2)
@state SV1 = SV1(-1) + SV7(-1) + [Var=exp(c(22))]
@state SV2 = SV1(-1)
@state SV3 = SV2(-1)
@state SV4 = c(10)*SV7 + SV9 + [var= exp(c(23))]
@state SV5 = SV4(-1)
@state SV6 = SV5(-1)
@state p2 = p(-1)
@state p3 = p(-2)
@state p4 = p(-3)
@state p5 = p(-4)
@state p6 = p(-5)
@state p7 = p(-6)
@state p8 = p(-7)
@state p9 = p(-8)
@state SV7 = SV7(-1) + [Var=exp(c(24))]
@state SV9 = SV9(-1) + SV9(-2) + [Var=exp(c(25))]
Thanks for reply. I re wrote my code by removing the specifications y1 and y2 as it was in my previous post and added lags directly into the Signal equation.
Now the problem is with my SV4. what is wrong with my SV4 specification?. My SV4 represents this equation r*t = c g(t)+ z (t), where that the natural rate of interest (r*t ) depends only on real factors, specifically the trend growth in the economy (gt) and a series of random factors, which are denoted by the variable zt, which in turn follows a stochastic process determined by equation (4).
Please help, I am badly struck.
@signal y = c(1)*y(-1) + c(2)*y(-2) + c(3)*r1 + c(4)*r2 + c(5)*SV1 - c(1)*SV2 - c(2)*SV3 - c(3)*SV4 - c(4)*SV5 - c(5)*SV6 + [var=exp(c(20))]
@signal p = c(6)*y(-1) + (1-3*(c(7))-3*(c(8)))*p2 + c(8)*p3 + c(8)*p4 + c(8)*p4 + c(9)*p5 + c(9)*p6 + c(9)*p7 + c(9)*p8 + [var=exp(c(21))]
@state r1 = r(-1)
@state r2 = r(-2)
@state SV1 = SV1(-1) + SV7(-1) + [Var=exp(c(22))]
@state SV2 = SV1(-1)
@state SV3 = SV2(-1)
@state SV4 = c(10)*SV7 + SV9 + [var= exp(c(23))]
@state SV5 = SV4(-1)
@state SV6 = SV5(-1)
@state p2 = p(-1)
@state p3 = p(-2)
@state p4 = p(-3)
@state p5 = p(-4)
@state p6 = p(-5)
@state p7 = p(-6)
@state p8 = p(-7)
@state p9 = p(-8)
@state SV7 = SV7(-1) + [Var=exp(c(24))]
@state SV9 = SV9(-1) + SV9(-2) + [Var=exp(c(25))]
- Attachments
-
- interest rate.wf1
- (16.29 KiB) Downloaded 226 times
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Syntax error
This would probably be a good time for you to review the material in the help system and/or to read up some background material on the specification of state space models.
Re: Syntax error
Hi Startz,
Iam seriously wondering, whether you are able to identify any prob in my SV4 specification.
and there is no hard rule mentioned in the guide that constant trend shouldn't be in state variable.
I have seen many posts where trubador helping very patiently and that really helps people.
Just looking for some help to build it up. Please tell what is the problem there in SV4 set up.
Iam seriously wondering, whether you are able to identify any prob in my SV4 specification.
and there is no hard rule mentioned in the guide that constant trend shouldn't be in state variable.
I have seen many posts where trubador helping very patiently and that really helps people.
Just looking for some help to build it up. Please tell what is the problem there in SV4 set up.
Who is online
Users browsing this forum: No registered users and 2 guests
