: Verifies that there is no second-order serial correlation ( ) in the first-differenced residuals.
Once the panel is declared, you can obtain panel‑aware summaries:
For panels with structural breaks, the xtbunitroot module allows testing with breakpoints. stata panel data exclusive
: If either heteroskedasticity or serial correlation is present, re-estimate your model using clustered standard errors at the unit level: xtreg income investment leverage, fe vce(cluster firm_id) Use code with caution.
The Hausman test compares the FE (consistent under both null and alternative) and RE (efficient under the null of no correlation) estimates. A significant test statistic (p < 0.05) suggests that the RE assumption of zero correlation is violated, so FE is preferred. : Verifies that there is no second-order serial
He didn't panic. He added the final, crucial piece of syntax: xtreg price exports rainfall, fe vce(cluster country_id)
Always run xtdescribe immediately after setting your panel. This gives you a visual representation of your panel's "balance"—showing you exactly where the gaps in your data reside. 2. Dealing with Endogeneity: The Hausman Test & Beyond The Hausman test compares the FE (consistent under
An estimator is only as reliable as its underlying error structure. In panel data, errors are routinely plagued by three violations: heteroskedasticity, serial correlation, and cross-sectional dependence. Heteroskedasticity