Hi,

I am running the following model

bys industry year: reg y x

predict e, residuals

Here, if I use predict residuals as above, I don't get correct residuals by industry and year. I tried the following
bys industry year: predict e, residuals

but it is a wrong syntax.

Can anyone please help me?