Indirect Calculation to Durban Watson Autocorrelation test

STATA does not provide the value for the Durban Watson for the case of cross sectional data, thus there is no direct way to determine the  presence of autocorrelation. So following syntax can be used after the OLS regression to generate the Durban Watson Statistic.

predict resid, resid

generate lresid = resid[_n-1]

  generate devsq = (resid – lresid)^2

  generate ressq = resid * resid

  tabstat ressq devsq, statistics( sum )

here divide the displayed value of devsq with ressq it will provide the value of DW, it ranges from 0 to 4. The more it is nearer to 2 the more chances that there is not autocorrelation.

Since it is a cross sectional data, so presence of autocorrelation means that there is some quality that exists in the error term that is inter-related across the cross sections. In other words it means there are some important variables missing.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s