试试这个。
xtreg Y X1 X2 X3, fe
outreg2 using "文件名", word dec(3) ctitle(fe) replace
estimates store fixed
xtreg Y X1 X2 X3, re
hausman fixed ., sigmamore
outreg2 using "文件名", word dec(3) ctitle(re) adds(chi-squared, r(chi2), p-value for the chi-squared, r(p)) adec(3) append