Statsby/ Parmsby and residuals

Hi everyone!

I am using the statsby command (or alternatively the parmsby command) to perform firm-specific regressions from a larger pool of data. Does anyone know how I can also extract the SSR (sum of squared residuals) for each of the regressions I perform?


When you use -statsby-, you need to specify the return values that you want to keep. If you don't -statsby- assumes you just want to keep the coefficients. See -help statsby-

So in your case you'd want something like:
statsby rss=e(rss), by(firm) clear: regress ...

See also -help return-