Hi all,

I have a panel dataset of 100 companies throughout a 72 month period (each company recorded activity at different times during the months, so the observations range from 3 to 61 months). I've been recording my regression results in a table for each of the companies using the following:

Code:
xtset Fullid Time

statsby _b _se  N=e(N) R=e(r2), by(Fullid) clear: regress logthpp logcpn
gen df_r = _eq2_N -1
gen plogthpp = 2 * ttail(e(df_r), abs(_b_cons/_se_cons))
gen plogcpn = 2 * ttail(e(df_r), abs(_b_logcpn/ _se_logcpn))
list, clean 
export excel using Results.xlsx, replace
I've been trying to add in a Durbin Watson test in this regression, but I can't seem to place it anywhere in the code where it will work. I initially tried placing it before stats by, ex:
Code:
xtset Fullid Time
estate Watson

statsby _b _se  N...(continues on as above)
This gave me a d-statistic of = .

I'm not sure why this has happened. Is estat dwatson the proper code to use for panel data?