Hello everyone,

I am trying to extract a regression output for a xtreg var var , fe process. My dataset contains around 650 variables and 400,000 observations. The grouping variable in my case is gvkey_n, the ID of the individual. I am using Stata 16 for Mac.

Currently, I am using the command

outreg2 using MToutput4.xls, append ctitle (ebitmargin developed model) dec(4)


to report the regression output on the dependent variable ebitmargin. However, the excel version created does not contain the within/ between groups reports.


How do I add the R^2 adjusted for each regression for the respective within groups R^2 adjusted and between groups R^2 adjusted?



Kind regards