Dear community,

I have a burning question for you
So I have a panel regression and would like to estimate the residual of such an estimation. In particular I have to do it using the command xtdata and, afterwards, estimating the residuals.
My problem is the following: when performing post estimation commands on reg, e.g. using:
Code:
predict av_t, res
do I include also the fixed effects? I am asking this since the graph I end up with seems to be have a downward trend which is impossible since residuals should fluctuate around 0 by definition.

I have also a further concern related: in particular, when performing the regression, I insert a variable that is time dependent, i.e. having set the variable Year as the time variable, I construct:

Code:
egen mean_gr_ratemarket_sales = mean(gr_rate_sales_atc3), by(Year)
but then am forced to insert the time dummies i.Year in regression, hence ending up with collinearity (i.e. the variable mean_gr_ratemarket_sales is omitted due to collinearity). Is there a way to solve such an issue?

Thank you very much,


Federico