I want get the predicted value of each regression of each group? Here is an example.
Code:
webuse grunfeld,clear forval i = 1/10{ reg invest kstock if company == `i' predict y`i' if company == `i' predict e`i' if company == `i',res } egen y = rowtotal(y1-y10) egen e = rowtotal(e1-e10)
Anyone have another simple method to get the predicted y and e of each group?
0 Response to How to get the predicted value of each group?
Post a Comment