## Correlation errors in state space models

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

Sergio
Posts: 5
Joined: Tue May 19, 2015 1:32 am

### Correlation errors in state space models

Dear all, I'm having some problems trying to write a sspace object.
I would like to model the contemporaneous correlation between the errors of the state and signal equations. I read from eviews manual that "to allow for correlation in the contemporaneous states and signals in time t, you will need to specify erros in the lagged states, and define correlation between the lagged state errors and the errors in the signal equation." I understand in principle what it means but I find difficult to implement it. let me give you an example.
I would like to model a correlation between e1 and the innovation in the state equation lagged one period, that is e3. but i know is not correct to define two times the same object (namely sv2).
would you please expalain how to do it properly?

@SIGNAL gdpyoy=c(50)*gdpyoy(-1)+c(51)*gdpyoy(-2)+(1-c(50)-c(51))*sv1+[ename = e1]
@state sv1 = sv1(-1)+ [ename = e2]
@state sv2 = sv1(-1)
@state sv2 = sv2(-1)+[ename = e3]

Thanks a lot
S.

Sergio
Posts: 5
Joined: Tue May 19, 2015 1:32 am

### Re: Correlation errors in state space models

I've tried this and it seems to work..... but not sure it is doing what I'm thinking...

@SIGNAL gdpyoy=c(50)*gdpyoy(-1)+c(51)*gdpyoy(-2)+(1-c(50)-c(51))*sv1+[ename = e1]
@state sv1 = sv1(-1)+ [ename = e2]
@state sv2=sv1(-1)
@state sv3 = sv2(-1)+[ename = e3]

I've imposed the same variance for e2 and e3.
Is it correct to specifiy the correlation in this way?
Thx
S

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

### Re: Correlation errors in state space models

Can you be more specific about the process you want to impose for your states? How do they evolve?

Sergio
Posts: 5
Joined: Tue May 19, 2015 1:32 am

### Re: Correlation errors in state space models

I think that the user guide should provvide an example on how to implement what is stated regarding the modelling of the contemporaneous correlation. I don't get what you mean for being more specific, it's my bad of course.

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

### Re: Correlation errors in state space models

Fair enough on the suggestion for the docs. The idea seemed straightforward when written, but I can see why it might not be obvious.

For now, let's try this a different way. Rather than me try to figure out your particular model, here is the basic idea for getting the correlation timing .(Note that this is not a real specification, it's just an example to show how to set up the timing):

Code: Select all

`@signal y = c(1) + sv2 +[ename= e1]@state sv1 = c(3) + c(4)*sv1(-1)+ [ename = e2]@state sv2 = sv1(-1)@evar var(e1) = exp(c(5))@evar var(e2) = exp(c(6))@evar cov(e1, e2) = c(7)`

Note that all we have done is to use the lagged state SV2 in the signal equation instead of the contemporaneous state.

Sergio
Posts: 5
Joined: Tue May 19, 2015 1:32 am

### Re: Correlation errors in state space models

Thank you Glenn you're deadly right. when it is written down it seems obvious. the example you provvided is very effective and I strongly suggest to add it to the next user guide. thanks so much Glenn. If I may I would put another question to you that is, I guess, of interest for many eviews users.
The question is: does Eviews support a way to evaluate both the parameter and the model uncertainty in the estimation of state variables in ssSpace object?
If I don't hear from you before Christmas let me wish you the best.
thanks
S