I'm working with a base that it´s compouse from 500 samples, but I have to create a compillation of coeficients and also i need predict the residuals from each regression, but idk how can i make the ´predictions with the command i used, some idea?

This is what I did to ger the 500 regressions, but when I try to get the residuals Stata only takes the last regression

by sample_id : eststo : reg lwage leduc
sttab using tabla1.rtf, nostar