Hi,
I would like to get the estimation by groups (industry). Lets say that I have 10 industries, and would like to estimate OLS by those 10 industry (separately!). That seems to be simple, as long as I specify the group/ industry for which regression holds. Example
The problem comes when I need to do the predictions, lets say of residuals within group 1. when I use command:
I get predictions for other groups too.. Does anyone know why? What do residual predictions mean for groups to which regression does not apply at all in the first place?
When I specify prediction in the following manner:
I get prediction only for group 1 and they are identical to the residual prediction of group 1 when I do not specify the group for which predictions apply.
Am I doing something wrong?
I would like to get the estimation by groups (industry). Lets say that I have 10 industries, and would like to estimate OLS by those 10 industry (separately!). That seems to be simple, as long as I specify the group/ industry for which regression holds. Example
Code:
reg x y z if group==1
Code:
predict res, residual
When I specify prediction in the following manner:
Code:
predict res if group=1, residual
Am I doing something wrong?
Comment