contemporaneous correlation in state equations

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

tadejus
Posts: 12
Joined: Thu May 18, 2017 7:41 am

Re: contemporaneous correlation in state equations

Postby tadejus » Wed May 24, 2017 5:28 am

EViews Glenn wrote:I'll admit upfront that I'm not following this thread carefully, and I'm not familiar with the application at hand, so I may be missing nuance in the way you want to construct the model. With those caveats, I'll note that if all you want is contemporaneous correlation between states, you can use the @ecov to allow for the errors to be correlated.

In my cursory decoding of the model, you have

Code: Select all

gap.append @state growth = c(2)*crec + (1-c(2))*growth(-1) + [var=exp(c(3))]
gap.append @state pot = pot(-1) + growth+ [var=exp(c(1))]


I think that this can be reparameterized as

Code: Select all

gap.append @state growth = c(2)*crec + (1-c(2))*growth(-1) + e1
gap.append @state pot = pot(-1) + c(2)*crec + (1-c(2))*growth(-1) + e2
gap.append @ename e1
gap.append @ename e2
gap.append @evar e1 = exp(c(3))
gap.append @evar e2 = exp(c(1))
gap.append @ecov(e1, e2) = c(4)
 

where the POT equation is derived by substituting in the contemporaneous growth equation and collecting error terms. If you are assuming the original state errors are uncorrelated, var(e2) corresponds to the sum of the original error variances, and the covariance between e1 and e2 is the variance of the original error in the growth equation.


Thanks Glenn,

this does produce some results (more reasonable ones then if you just ignore the dynamics altogether and use level instead of lagged variables in state equations) but I will have to think what it exactly does, bacause it is not the same to say that the errors to two generating processes are correlated as to say that the generating process has contemporaneous variables on RHS..
in the first case it could be that the same thing (variable) is causing both processes and this is what makes their errors correlated whereas in the second case the first causes the second and so the first should be on the RHS in explaning the second..
but your code does work..
only has small typos so if somebody should use it do write

Code: Select all

gap.append @evar var(e1) = exp(c(3))
gap @evar cov(e1, e2) = c(4)


instead of

Code: Select all

gap.append @evar e2 = exp(c(1))
gap.append @ecov(e1, e2) = c(4)

thanks

cglopes
Posts: 1
Joined: Wed Jul 22, 2020 9:44 am

Re: contemporaneous correlation in state equations

Postby cglopes » Wed Jul 22, 2020 9:56 am

tadejus wrote:
EViews Glenn wrote:I'll admit upfront that I'm not following this thread carefully, and I'm not familiar with the application at hand, so I may be missing nuance in the way you want to construct the model. With those caveats, I'll note that if all you want is contemporaneous correlation between states, you can use the @ecov to allow for the errors to be correlated.

In my cursory decoding of the model, you have

Code: Select all

gap.append @state growth = c(2)*crec + (1-c(2))*growth(-1) + [var=exp(c(3))]
gap.append @state pot = pot(-1) + growth+ [var=exp(c(1))]


I think that this can be reparameterized as

Code: Select all

gap.append @state growth = c(2)*crec + (1-c(2))*growth(-1) + e1
gap.append @state pot = pot(-1) + c(2)*crec + (1-c(2))*growth(-1) + e2
gap.append @ename e1
gap.append @ename e2
gap.append @evar e1 = exp(c(3))
gap.append @evar e2 = exp(c(1))
gap.append @ecov(e1, e2) = c(4)
 

where the POT equation is derived by substituting in the contemporaneous growth equation and collecting error terms. If you are assuming the original state errors are uncorrelated, var(e2) corresponds to the sum of the original error variances, and the covariance between e1 and e2 is the variance of the original error in the growth equation.


Thanks Glenn,

this does produce some results (more reasonable ones then if you just ignore the dynamics altogether and use level instead of lagged variables in state equations) but I will have to think what it exactly does, bacause it is not the same to say that the errors to two generating processes are correlated as to say that the generating process has contemporaneous variables on RHS..
in the first case it could be that the same thing (variable) is causing both processes and this is what makes their errors correlated whereas in the second case the first causes the second and so the first should be on the RHS in explaning the second..
but your code does work..
only has small typos so if somebody should use it do write

Code: Select all

gap.append @evar var(e1) = exp(c(3))
gap @evar cov(e1, e2) = c(4)


instead of

Code: Select all

gap.append @evar e2 = exp(c(1))
gap.append @ecov(e1, e2) = c(4)

thanks



tadejus, tudo bem? obrigado pela correção.

Eu sei que faz muito tempo que você fez isso, mas voce conseguiu um outro jeito usar a variavel contemporanea ou teve que usar esse artificio do Glenn?

Obrigado


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 44 guests