The Durbin-Watson statistic is a statistical tool that detects whether the residuals of the regression are autocorrelated. Autocorrelation is a statistical problem where the residuals of a time-series regression are not random, but instead have some type of pattern. This problem does not bias the coefficients of the estimate, but it does have an impact on the standard errors. This means that if your regression has autocorrelation problems, there may be results that appear to be statistically significant but are not. Thus, calculating a Durbin-Watson statistic using Stata will allow you to see if this is an issue of concern.
Things You'll Need
- Stata, version 9 or higher
- Time-series data set
Open up the database in Stata and format it in a time series format where each line of data represents a distinct year or time period.
Create a dummy variable for each time period. If your data only has one period, you can use the code: gen year=_n. If your data are set up of different places observed over time, you can use: bysort place: gen year=_n, where place is whatever location you observed
Use the tsset command to specify the time period of your data and allow the Durbin-Watson statistic to calculate. For example, if the data is set up where year is the time series variable, you would enter: tsset year
Use the estat command to generate the Durbin-Watson statistic. Do this by using the code estat dwatson if your data are strictly endogenous and estat durbinalt if your data are not strictly endogenous.
Interpret the results by looking the p-value and the chi-squared statistics. The p-value tests for serial correlation. If the p-value is greater than 0.05, then there is no serial correlation and your data are fine. If the p value is less than 0.05 then there are serial correlation issues that need to be addressed.
Tips & Warnings
- This is a complex test that should not be done unless you have a firm understanding of statistics and regression
- Introductory Econometrics: A Modern Approach; Jeffrey Wooldridge; 2009
- UCLA Academic Technology Services: Stata--Regression Analysis by Example
- Photo Credit Girl having too much work to do image by Angel_a from Fotolia.com
Basics of Statistical Analysis
Statistical analysis is about making sense of a set of data or a series of observations. Most people, whether they realize it...
How to Calculate Statistical Sample Sizes
Sample size is very important to ensure that an experiment yields statistically significant results. If the sample size is too small, the...
How to Do a Linear Regression in SPSS or PASW Statistics
When you perform a linear regression, you're essentially attempting to predict the value of a dependent variable (e.g., as a person's blood...
How to Calculate Statistical Significance
Statistical significance is an important concept to understand when interpreting data yielded from experiments. The term "statistical significance" refers to the probability...
How to Calculate an Autocorrelation Coefficient
Autocorrelation is a statistical method used for time series analysis. The purpose is to measure the correlation of two values in the...
How to Calculate a Standard Error Regression
Regression analysis is used for analyzing historical or experimental data. It allows you to determine to what extent the results are correlated...
How to Calculate a T-Statistic
T-statistics are used in the calculation of small-sample statistics (that is, where a sample size, n, is less than or equal to...
How to Calculate T-Test Statistics
When you gather data or perform an experiment, you usually want to demonstrate that there's a connection between a change in one...
How to Interpret Chi-Squared
Chi-squared, more properly known as Pearson's chi-square test, is a means of statistically evaluating data. It is used when categorical data from...
How to Calculate the Critical Value on a Calculator
Critical value is a statistical term used to describe the significance of a particular number. More specifically, it is the value that...