Hello Statalist,

I am attempting to automate the creation of a summary statistics table to report the standard deviation for a set of variables. Please take the following rudimentary "skeleton" table as an example of what I am trying to create.

SD SD Net Panel FE SD Net Panel and Time FE
Variable A

Now, please consider the Stata example dataset "xtline1.dta" as an example of the panel data that I am working with.

Code:
sysuse xtline1, clear
xtset person day

quietly regress calories
di e(rmse)
quietly xtreg calories, fe i(person)
di e(rmse)
quietly xtreg calories i.day, fe i(person)
di e(rmse)
First, this chunk above demonstrates that if I regress the variable of interest (calories) first against itself I can retrieve the raw standard deviation from the e-return list (in the form of the RMSE). Second, this shows that if I regresscalories against a full set of panel unit fixed effects I can retrieve the standard deviation net the unit effects. Third, this shows that if I regress calories against a full set of both panel unit and time unit fixed effects I can also easily obtain the standard deviation net the unit and time effects.

Using this example, how would one automate the creation of the included skeleton table? I have tried using Ben Jann's wonderful estout package, but the "estadd, ysumm" command doesn't seem to accommodate calculating the summary statistics for the y-variable across multiple model specifications.

Any help would be greatly appreciated. Thank you for your time.