How to run regression by industry and year in STATA

#1
Hello,

I am new to STATA and encountering problem to run regression by industry and year. I need to calculate residuals for each observation (1940) for my main model.

Any help would be appreciated.

Tahir