Q-statistics calculated from 2SLS with AR(1) errors

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

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Wed Feb 13, 2013 2:25 pm

I am using Eviews 7.1 to estimate a nonlinear 2SLS with AR(1) errors. I have found that the residual graphs and Q-statistics change depending on the initial starting value that I provide for the coefficient on the AR(1) error term, even though the program still converges to the same solution, so the estimated coefficients are unchanged.

According to the Eviews help manual: "For AR models, the residual-based regression statistics-such as the standard error of regression, and the Durbin-Watson statistic- reported by EViews are based on the one-period ahead forecast errors." Indeed, when I change the starting value for the AR(1) coefficient, the Durbin-Watson statistic does not change. I believe the Q-statistics and Durbin-Watson statistic should be computed from the same residuals, so the Q-statistics should not change either.

Can anyone clarify why the Q-statistics change depending on the starting value, yet the Durbin-Watson statistics do not? Shouldn't they both be computed based on the one-period ahead forecast errors?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Wed Feb 13, 2013 9:24 pm

I cannot replicate what you are seeing:

Code: Select all

rndseed 1 create u 100 series y=nrnd series x=nrnd series z=nrnd c=0 equation eq1.tsls y=c(1)+c(1)*c(2)*x + [ar(1)=c(3)] @ z freeze(qstat1) eq1.correl c=1 equation eq2.tsls y=c(1)+c(1)*c(2)*x + [ar(1)=c(3)] @ z freeze(qstat2) eq2.correl show qstat1 show qstat2

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 10:19 am

Thanks for your reply! Your example was helpful, and I think it gets us closer to finding the source of my confusion.

It seems the main difference between your example and my setup is that I have my equations defined within a system object (because I am also doing 3SLS). I just did a little experiment by taking one of my equations and estimating it using TSLS under both the equation object and the system object. The estimates were identical under both objects, just as the manual says they should be. Furthermore, just as in your example, the Q-statistics in my experiment calculated under the equation object did not change based on the initial parameters. However, the Q-stats calculated under the system object (the portmanteau autocorrelation tests) were different and did change based on the initial parameters.

So can you help me understand what is different about the system object setup that results in the calculation of different Q-statistics, even for the same single equation estimation?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Thu Feb 14, 2013 10:32 am

Code: Select all

rndseed 10 create u 100 series y=nrnd series x=nrnd series z=nrnd c=0 system sys1 sys1.append y=c(1)+c(2)*x + [ar(1)=c(3)] @ z sys1.tsls freeze(qstat1) sys1.qstats c=5 system sys2 sys2.append y=c(1)+c(2)*x + [ar(1)=c(3)] @ z sys2.tsls freeze(qstat2) sys1.qstats show qstat1 show qstat2

Perhaps you could provide the case where this is happening?

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 10:45 am

In the attached workfile, see the equation object called "test" and the system object called "test2". Both specify the same equation, and when estimated using TSLS yield the same estimated coefficients, same D-W statistics, etc. However, the Q-statistics are different, and in the system object they change depending on the initial parameter values.
Attachments
example.wf1
(61.39 KiB) Downloaded 283 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Thu Feb 14, 2013 11:13 am

Because they're based on different calculations. The equation's Q-statistics are based on the single series calculation:
T(T+2)*Sum(r^2/(T-J)).

The system's q-statistics are based on the Portmanteau version given in Luktepohl. Roughly speaking it is:
T*Sum(r^2).

Obviously as T gets large they become identical.

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 11:21 am

Ok, this is helpful. But one question still remains. Why, under the system object, do the Q-statistics (and the residual plots) change depending on the initial guess, even though it converges to the same solution for the estimated coefficients?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Thu Feb 14, 2013 11:22 am

You haven't shown a case where that is true.

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 11:33 am

It is the case in workfile I provided earlier in this thread.

1) Start with the system object called "test2". When the initial guess is zero for both coefficients, the TSLS estimated coefficients are: GN(1)=0.058 and C(7)=0.335. The Portmanteau autocorrelation test yields, for example, a Q-stat of 55.461 for the first lag.

2) Using the same system called "test2", now change the the initial guess for both coefficients to one, and the TSLS estimated coefficients are still: GN(1)=0.058 and C(7)=0.335. The Portmanteau autocorrelation test now yields a Q-stat of 8.116 for the first lag.

A quick glance at the residual plots for each set of initial values shows that they are very different as well, so the different residuals must be the reason for the different Q-statistics. But the residuals should not change if the estimated coefficients do not change.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Thu Feb 14, 2013 11:40 am

You should update your copy of EViews. I get q-stats nowhere near those values.

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 11:44 am

Updating will be easier said than done because it is a university license, but I will work on that.

In the meantime, can you help me troubleshoot by answering the following:
1) Are you able to replicate the estimated coefficients that I get?
2) What are the q-statistics you get?
3) Do your q-statistics and residuals plots change depending on the initial guess?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby EViews Gareth » Thu Feb 14, 2013 12:00 pm

here
Attachments
spool01.pdf
(44.89 KiB) Downloaded 590 times

cmherrin
Posts: 7
Joined: Wed Feb 13, 2013 2:21 pm

Re: Q-statistics calculated from 2SLS with AR(1) errors

Postby cmherrin » Thu Feb 14, 2013 5:52 pm

Problem solved! We updated to the latest version, and I now get the same results as you posted above. Thank you for your help!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests