Page 1 of 1

syntax error in specifying state space model

Posted: Tue Sep 16, 2014 7:33 am
by EviewsUser1
@ename e1
@ename e2
@evar var(e1)=exp(c(4))
@evar var(e2)=exp(c(5))

@signal ipg_norm = c(6)*sv(1)+e1
@state sv1 = c(1)*sv1(-1) + c(2)*sv2(-1) + c(3)*sv3(-1)+e2
@state sv2 = sv1(-1)
@state sv3 = sv2(-2)

the syntax error occurs on the @signal equation

Re: syntax error in specifying state space model

Posted: Tue Sep 16, 2014 12:10 pm
by NicolasR
Hi,

You have two typos,

Code: Select all

@ename e1 @ename e2 @evar var(e1)=exp(c(4)) @evar var(e2)=exp(c(5)) @signal ipg_norm = c(6)*sv1+e1 ' you wrote the state variable as a lead of orden one,this can not be done @state sv1 = c(1)*sv1(-1) + c(2)*sv2(-1) + c(3)*sv3(-1)+e2 @state sv2 = sv1(-1) @state sv3 = sv2(-1) ' you wrote the state variable 3 as a lag of orden two of the state variable 2 if you want another lag you should enter @state sv4=sv3(-1)
That will work.