use http://www.stata-press.com/data/r11/nlswork, clear version 11 log using panel_example, replace text describe tabulate race tabulate occ_code summarize 2.race by race, sort : summarize ln_wage grade collgrad global xlist age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure 2.race not_smsa south qui xtreg ln_w $xlist, fe estimates store fe xtreg ln_w $xlist, fe vce(cluster idcode) estimates store fe_cluster qui xtreg ln_w $xlist, be estimates store be qui xtreg ln_w $xlist, re predict alpha, u summarize alpha, detail xttest0 estimates store re qui reg ln_w grade $xlist, vce(cluster idcode) estimates store ols estimates table fe fe_cluster be re ols, t(%12.3f) b(%12.5f) stats(r2 rss aic) hausman fe re log close