Dear eviews moderators,
my name is Yacine and that's my first post on the forum. I read it regularly (btw it is really helpful), but sorry if my question has already been asked. Please note that I am using Eviews 8.
I'm trying to use the sspace object to estimate a hidden variable (potential GDP) out of a system of equations, but I'm having some issues with it.
Here is the system
@signal pi = pi(-1)+c(1)*pi(-2)+c(2)*(u(-1)-upot(-1))+[var = exp(c(3))]
@signal u=upot+ c(11)*(u(-1)-upot(-1))+c(12)*(u(-2)-upot(-2))+[var = exp(c(13))]
@signal y =ypot+c(4)*(u(-1)-upot(-1))+c(5)*(u(-2)-upot(-2)) + [var = exp(c(6))]
@state ypot = beta+ypot(-1)+[var = exp(c(7))]
@state upot = gsi+upot(-1)+[var = exp(c(8))]
@state beta = beta(-1)+[var = exp(c(9))]
@state gsi = gsi(-1)+[var = exp(c(10))]
param c(1) 1 c(2) 1 c(3) 1 c(4) 1 c(5) 1 c(6) 1 c(7) 1 c(8) 1 c(9) 1 c(10) 1 c(11) 1 c(12) 1 c(13) 1
(The priors are not yet my problem)
y is the log of GDP. ypot is potential GDP. pi is inflation u is the jobless rate. beta and gsi are random walks allowing my potential to move.
My understanding is that I cannot have lagged state variables in a measurement equation, that would be why I keep getting error messages when hitting "Estimate".
Is there a way to get around that problem (and all the others that you see)? I started working with kalman filters only recently, so sorry if my question sounds stupid or if there is a big problem in my system!
Sincerely,
Yacine
Sspace estimation
Moderators: EViews Gareth, EViews Moderator
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Sspace estimation
There's a standard "trick"
@state upotLagged = upot(-1)
then use upotLagged in the signal equation
@state upotLagged = upot(-1)
then use upotLagged in the signal equation
Re: Sspace estimation
Thanks a lot for your quick answer.
That seems to do it with the signal equations. Now the only problem that I have is that I had to get rid of the random walks (Beta and Gsi) to have "estimate" working and have no more error message on the state equations.
Looks like I can't put a state variable in another state equation. Or is there a way to do it?
Thank again for your help!
Yacine
That seems to do it with the signal equations. Now the only problem that I have is that I had to get rid of the random walks (Beta and Gsi) to have "estimate" working and have no more error message on the state equations.
Looks like I can't put a state variable in another state equation. Or is there a way to do it?
Thank again for your help!
Yacine
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Sspace estimation
I don't think that's your problem. To quote the help system
Each state equation must be linear in the one-period lag of the states.
Re: Sspace estimation
The thing is, if I get rid of beta and gsi, and make the system like this there is no error message.
@signal pi = pi(-1)+c(1)*pi(-2)+c(2)*(u(-1)-upotlagged)+c(3)*(u(-2)-upotlagged2)+[var = exp(c(3))]
@signal u=upot+ c(4)*(u(-1)-upotlagged)+c(5)*(u(-2)-upotlagged2)+[var = exp(c(6))]
@signal y =ypot+c(7)*(u(-1)-upotlagged)+c(8)*(u(-2)-upotlagged2) + [var = exp(c(9))]
@state ypot = ypot(-1)+[var = exp(c(10))]
@state upot = upot(-1)+[var = exp(c(11))]
@state upotlagged = upot(-1)
@state upotlagged2 =upotlagged (-1)
@state ypotlagged = ypot(-1)
@signal pi = pi(-1)+c(1)*pi(-2)+c(2)*(u(-1)-upotlagged)+c(3)*(u(-2)-upotlagged2)+[var = exp(c(3))]
@signal u=upot+ c(4)*(u(-1)-upotlagged)+c(5)*(u(-2)-upotlagged2)+[var = exp(c(6))]
@signal y =ypot+c(7)*(u(-1)-upotlagged)+c(8)*(u(-2)-upotlagged2) + [var = exp(c(9))]
@state ypot = ypot(-1)+[var = exp(c(10))]
@state upot = upot(-1)+[var = exp(c(11))]
@state upotlagged = upot(-1)
@state upotlagged2 =upotlagged (-1)
@state ypotlagged = ypot(-1)
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Sspace estimation
The problem is in
You can't have a current state on the RHS. Use the lag renaming trick to get get lagged states into these equations.
Code: Select all
@state ypot = beta+ypot(-1)+[var = exp(c(7))]
@state upot = gsi+upot(-1)+[var = exp(c(8))]
Re: Sspace estimation
great thank you.
I replaced beta with beta(-1) and at least I got a result.
I'll keep you posted as I advance
thanks
Yacine
I replaced beta with beta(-1) and at least I got a result.
I'll keep you posted as I advance
thanks
Yacine
Who is online
Users browsing this forum: No registered users and 1 guest
