Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: DW and panel data

From   Christopher F Baum <[email protected]>
To   [email protected]
Subject   st: Re: DW and panel data
Date   Fri, 4 Jun 2004 11:21:07 +0100

On Jun 3, 2004, at 7:33 AM, Clive wrote:

Welcome to the Statalist, Justin. No worries: I'm a simple man who likes
simple questions! The -dwstat- command is what you're looking for, I

. reg y x1 x2
. dwstat

However, for panel models like -xtreg- and the rest, Kit Baum's
- -panelauto- includes a slightly different version, called -dwstat2-: type
- -ssc install panelauto.
Yes,and no. dwstat2 will calculate the DW stat for a SINGLE timeseries' worth of residuals from, e.g., xtreg. It will NOT calculate a single DW stat from a panel data regression, for the simple reason that it makes no sense whatsoever to do so (even if the regression is run as pooled OLS). The D-W statistic, like any measure of AR(1) in time series, is looking for the first-order autocorrelation coefficient. If you use pooled OLS, it will take the 1st obs on unit 2 to be one time period later than the last obs on unit 1, etc. For that reason the official Stata commands (cf. panelauto) will not run at all in a panel context. This is too harsh, perhaps, since if you know what you are doing (and estimate a DW separately for each TS in the panel) there is nothing wrong with that.

One could compute an average of the DWs from the panel; that would be similar to one of the panel unit root tests, which averages Dickey-Fuller t statistics over the panel. But I do not know what the statistical properties of that average might be in terms of making an inference, which would presumably be that none of the TS in the panel have \rho differing from zero.


* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index