State space estimate

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

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

State space estimate

Postby startz » Sun Sep 12, 2010 2:05 pm

I wonder if anyone has a suggestion as to why I get such a poor estimate in the following state space problem.

Here's how I generated the data.
Note that the coefficient on X in the state equation equals 1.

Code: Select all

wfcreate localLevelXX u 320 series x1 = nrnd series x2 = nrnd series state = 0 smpl 2 @last state = X1 + state(-1) + .4*nrnd series localLevel = x2 + state + .4*nrnd

Code: Select all

@signal locallevel = c(1)*x2 + sv1 + [var=exp(c(3))] @state sv1 = c(2)*x1 + sv1(-1) + [var=exp(c(4))]
The results for the coefficient are off by about 7 standard errors.

Sspace: XX
Method: Maximum likelihood (Marquardt)
Date: 09/12/10 Time: 14:01
Sample: 2 320
Included observations: 319
Convergence achieved after 1 iteration

Coefficient Std. Error z-Statistic Prob.

C(1) 1.007818 0.048065 20.96797 0.0000
C(2) 0.236708 0.110646 2.139331 0.0324
C(3) -1.053681 0.383175 -2.749872 0.0060
C(4) -0.298956 0.256044 -1.167595 0.2430

Final State Root MSE z-Statistic Prob.

SV1 13.04754 1.000059 13.04677 0.0000

Log likelihood -506.6555 Akaike info criterion 3.201602
Parameters 4 Schwarz criterion 3.248814
Diffuse priors 1 Hannan-Quinn criter. 3.220457
Attachments
locallevelxx.wf1
(20.16 KiB) Downloaded 184 times

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

Re: State space estimate

Postby EViews Glenn » Mon Sep 13, 2010 11:59 am

I think that the way you've specified it, it's a hard model to estimate. Bear in mind that you are trying to estimate the coefficient on the stationary component inside an unobserved state variable that is generated by a random walk (would we think of that as a random drift term??). In that respect, it is not surprising to me that the coefficient estimate isn't particularly well estimated.

But there doesn't seem to be any reason to push the X1 into the unobserved component when we have perfect good observations on it (it took me a bit of time to come to this realization). So I took the liberty of rewriting your specification using the following form:

Code: Select all

@signal locallevel = c(1)*x2 + sv1 + c(2)*x1t + [var=exp(c(3))] @state sv1 = sv1(-1) + [var=exp(c(4))]
where

Code: Select all

series x1t=@cumsum(x1)
which, though I'm not a time-series expert, I believe is an equivalent representation. Estimating this model I get
Sspace: UNTITLED
Method: Maximum likelihood (Marquardt)
Date: 09/13/10 Time: 11:47
Sample: 2 320
Included observations: 319
Convergence achieved after 1 iteration

Coefficient Std. Error z-Statistic Prob.

C(1) 1.044311 0.031256 33.41202 0.0000
C(2) 0.990498 0.033984 29.14570 0.0000
C(3) -1.833384 0.162179 -11.30469 0.0000
C(4) -1.857631 0.185341 -10.02277 0.0000

Final State Root MSE z-Statistic Prob.

SV1 1.710481 0.504168 3.392680 0.0007

Log likelihood -318.9313 Akaike info criterion 2.024647
Parameters 4 Schwarz criterion 2.071860
Diffuse priors 1 Hannan-Quinn criter. 2.043502
which is much better, and the estimates of the variances are pretty good.

Just for kicks I tried 5000 obs with your DGP and am happy to report that asymptotics seem to work.
Sspace: XX
Method: Maximum likelihood (Marquardt)
Date: 09/13/10 Time: 11:52
Sample: 2 5000
Included observations: 4999
Convergence achieved after 13 iterations

Coefficient Std. Error z-Statistic Prob.

C(1) 1.004974 0.007745 129.7592 0.0000
C(2) 1.004738 0.008368 120.0649 0.0000
C(3) -1.837378 0.039868 -46.08598 0.0000
C(4) -1.854269 0.046545 -39.83780 0.0000

Final State Root MSE z-Statistic Prob.

SV1 -1.290993 0.504500 -2.558956 0.0105

Log likelihood -4894.437 Akaike info criterion 1.959767
Parameters 4 Schwarz criterion 1.964981
Diffuse priors 1 Hannan-Quinn criter. 1.961594
I learned something from this exercise. The lesson that I take out of this is that if we can observe something we are best off using that information as much as we can...rather than shoving it into the unobserved states.

[Addendum: FYI. After my initial post I did some experimenting with a random walk with drift -- which is the analogous model -- and it seemed to estimate fine. So there is something about the "stochastic drift" (I just made that up) model you presented which makes it more difficult for the algorithms to estimate. I'll look into whether there is something in the way we estimate it that causes problems.]

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

Re: State space estimate

Postby startz » Mon Sep 13, 2010 5:32 pm

Glenn,

I just ran your re-formulated version through my Bayesian code and my results match EViews.

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

Re: State space estimate

Postby EViews Glenn » Tue Sep 14, 2010 11:14 am

Good to hear...

Just to follow up for those following at home since Startz and I have had a brief private conversations about this.

We are both a bit puzzled as to why the reformation makes things so much better. After all a likelihood is a likelihood, no? Well maybe...maybe not...

In both Startz's homebrewed Bayesian code and in the built-in EViews routines, we find that the formulation of the system does matter. That is, Startz also finds odd results when writing the specification in the drift form. (So perhaps a likelihood is not quite a likelihood :)) Our suspicion is that numeric evaluation issues matter here. While the likelihoods should be the same, all things equal, it's very difficult in this particular setting to get all things to be equal, so we never quite evaluate the two systems at the same "point". Path dependence may then play a role as may differences in the precision of numeric derivatives. Given that we are trying to tease out the path of unobserved variables, perhaps this shouldn't be surprising, but we both found it a bit unexpected and worth noting for those who estimate these kinds of models.

I do think that my comment that if you possible should write components of your state space specification in observables space to be a reasonable intuitive conclusion from this example.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests