Stata Panel Data May 2026
Treats the data as one big cross-section, ignoring the panel structure.
Not including year dummies can make your FE model pick up economy-wide trends and claim them as treatment effects. Solution: Always include i.year or use xtreg, fe with time dummies. stata panel data
Already reported after xtreg, fe.
Use esttab or outreg2 to produce publication-ready tables. Treats the data as one big cross-section, ignoring
eststo clear
eststo: reg ln_wage hours age tenure, vce(cluster idcode)
eststo: xtreg ln_wage hours age tenure, fe
eststo: xtreg ln_wage hours age tenure, re
esttab est1 est2 est3, se star(* 0.10 ** 0.05 *** 0.01) ///
mtitles("Pooled OLS" "Fixed Effects" "Random Effects") ///
addnotes("Standard errors clustered at individual level")
xtline wage, overlay legend(off) title("Wage trajectories by individual")
xtline wage, by(idcode, note("First 20 individuals")) ylabel(, angle(0))
xtreg ln_wage hours age tenure, fe
xtcd
We model log wages (ln_wage) as a function of hours worked, age, and tenure. xtreg ln_wage hours age tenure, fe
xtcd