sspace with error in the states

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

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

sspace with error in the states

Postby Aqua » Mon Aug 02, 2010 8:10 am

Dear Eviews Users,
I have to estimate a time-varying parameter model, where the states equation contain error.
Say, my model is

sspace ss1
ss1.append @signal pid = sv1*epi + sv2*pid(-1) + sv3*mchatqt + [var=(c(1))]
ss1c.append @state sv1 = sv1(-1) + [var=(c(2))]
ss1.append @state sv2 = sv2(-1) + [var=(c(3))]
ss1.append @state sv3 = sv3(-1) + [var=(c(4))]

vector(3) svec0
svec0.fill 0.7, 0.2, 0.1
sym(2) svar0
svar0.fill 1e6, 1e6, 1e6

The problem is: when I estimate the previous model, things look bad because I get wrong estimates of the parameters and no standard error for them. Actually, Eviews returns NA for the std.error.

But, when this model,
sspace ss1
ss1.append @signal pid = sv1*epi + sv2*pid(-1) + sv3*mchatqt + [var=(c(1))]
ss1c.append @state sv1 = sv1(-1)
ss1.append @state sv2 = sv2(-1)
ss1.append @state sv3 = sv3(-1)

is estimated, I can recover the estimates with their standard errors. I would like to know why it is impossible to estimate the std.errors.

Thanks in advance,

Aqua!

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: sspace with error in the states

Postby trubador » Mon Aug 02, 2010 12:33 pm

Second model will yield similar results to those of ols estimation, since coefficients are time invariant. The problem of the first model can be the initial values for the state variables. Diffuse estimation already assumes very large variances, so it would be more helpful to supply feasible initial values for variances. Since you have supplied mean values, maybe you do have some idea for variances or you can use output from other estimation techniques (e.g. ols).

State space estimations are more difficult and complex compared to other techniques. Please search the forum and go over the users guide in detail before going any further...

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: sspace with error in the states

Postby Aqua » Tue Aug 03, 2010 6:01 am

Many thanks Trubador. That was a problem of starting values, effectively. I'm trying to fix this.
Aqua!

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: sspace with error in the states

Postby Aqua » Tue Aug 03, 2010 4:05 pm

Hello,
Actually, my problem seems a little bit complicated. In my the state space representation, the "signal" equation contains at least one endogenous regressor, named "epi" (which is pid(1)). I think, in order to consistently estimate the model with the Kalman filter tool, one has to correct for this endogeneity, using instrumental variables. Does Eviews take this into account? Otherwise, how can I correct for the endogeneity on Eviews?

When I code the estimation with Matlab or Gauss, where the correction is taken into account, I have very different results compared to Eviews. That's the motivation of my questions.

Thanks in advance,
A.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: sspace with error in the states

Postby startz » Tue Aug 03, 2010 5:14 pm

Aqua wrote:Hello,
Actually, my problem seems a little bit complicated. In my the state space representation, the "signal" equation contains at least one endogenous regressor, named "epi" (which is pid(1)). I think, in order to consistently estimate the model with the Kalman filter tool, one has to correct for this endogeneity, using instrumental variables. Does Eviews take this into account? Otherwise, how can I correct for the endogeneity on Eviews?

When I code the estimation with Matlab or Gauss, where the correction is taken into account, I have very different results compared to Eviews. That's the motivation of my questions.

Thanks in advance,
A.

EViews does not do instrumental variables here. How could it, when you haven't said what the instruments are?
If the instruments are z1 and z2, you may be able to accomplish what you want by adding

Code: Select all

@signal epi = epistate + [var=c(5)]
@state epistate = c(6)*z1 + c(7)*z(2) +[var=c(8)]

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: sspace with error in the states

Postby Aqua » Tue Aug 03, 2010 5:56 pm

Hi Startz, thank you. Well, I didn't specify the instrumental variables since I didn't know how to do it.
A.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: sspace with error in the states

Postby startz » Tue Aug 03, 2010 6:44 pm

I left out that in the first equation you need to replace epi with epistate.
By the way, I'm not sure this is exactly the instrumental variable estimator.

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: sspace with error in the states

Postby Aqua » Wed Aug 04, 2010 12:52 pm

Hi Startz, Thanks for the reply. I am not sure I understand well what you mean. Here what I understand (tell me if I am wrong)

Your last point suggests that the model is estimated according to a two-step approach. In the first step, I have to estimate

@signal epi = epistate + [var=c(5)]
@state epistate = c(6)*z1 + c(7)*z(2) +[var=c(8)]

and save the filtered state epistate. Then in the second step, I replace epi with the filtered epistate and estimate the state space. Is this correct?

Actually, I would like to apply the method proposed by Chang-Jin Kim in different papers, one of your coautors( :) ), in dealing with the estimation of time-varying parameter model with endogenous regressors.

Thanks, dear Startz

A.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: sspace with error in the states

Postby startz » Wed Aug 04, 2010 1:26 pm

Aqua wrote:Hi Startz, Thanks for the reply. I am not sure I understand well what you mean. Here what I understand (tell me if I am wrong)

Your last point suggests that the model is estimated according to a two-step approach. In the first step, I have to estimate

@signal epi = epistate + [var=c(5)]
@state epistate = c(6)*z1 + c(7)*z(2) +[var=c(8)]

and save the filtered state epistate. Then in the second step, I replace epi with the filtered epistate and estimate the state space. Is this correct?

Actually, I would like to apply the method proposed by Chang-Jin Kim in different papers, one of your coautors( :) ), in dealing with the estimation of time-varying parameter model with endogenous regressors.

Thanks, dear Startz

A.


My suggestion was to insert epistate in the state space model and do it all in one step. But you're right, following Kim's method is the correct way to do it. I don't think that can be done within EViews.

Aqua
Posts: 14
Joined: Mon Aug 02, 2010 7:17 am

Re: sspace with error in the states

Postby Aqua » Wed Aug 04, 2010 2:11 pm

Ok, thanks. But when I do this, I get the following message:' Signal variables are not allowed in state equations'.

Here is the complete model:

sspace ss1
ss1.append @signal epi = epistate + [var=c(5)]
ss1.append @state epistate = c(6)*z1 + c(7)*z(2) +[var=c(8)]
ss1.append @signal pid = sv1*epistate + sv2*pid(-1) + sv3*mchatqt + [var=(c(1))]
ss1c.append @state sv1 = sv1(-1) + [var=(c(2))]
ss1.append @state sv2 = sv2(-1) + [var=(c(3))]
ss1.append @state sv3 = sv3(-1) + [var=(c(4))]


Ok, the Kim's method cannot be done within EViews. I have coded the Kim's method within Matlab, but acI have some bizarre results, I wanted to know wheter it is a programming mistake or problem in the model or in the data. Unfortunately!

Thanks,
A.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 55 guests