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.