Comparing OLS with Fixed effects and time fixed effects
webuse nlswork // sample data
xtset idcode year // set as panel data
reg ln_w union ttl_exp tenure, robust
outreg2 using my_panel_reg.doc, replace label ctitle(OLS) title(Table XX: Comparing OLS and FE models)
xtreg ln_w union ttl_exp tenure, fe robust
outreg2 using my_panel_reg.doc, append label ctitle(FE indiv.) addtext(Individual FE, YES)
xtreg ln_w union ttl_exp tenure i.year, fe robust
outreg2 using my_panel_reg.doc, append label ctitle(FE/Time FE.) keep(union ttl_exp tenure)
addtext(Individual FE, YES, Year FE, YES)
In fixed effects models you do not
have to add the FE coefficients,
you can just add a note indicating
that the model includes fixed
effects. This can be added from
outreg2, see the option
addtex() above.
Oscar Torres-Reyna 6
The file my_panel_reg.doc will be
saved in the working directory