I would like to run the fixed-effect regression. First of all, I need to calculate the average values of the sale, asset and invest of different years for company AAA. Then do the same thing for companies BBB and CCC. Next, each original value minuses the average value, then the differences are used to run the regression. That is fixed-effect regression, right?
Year company sale asset invest
1991 AAA 23 56 3.2
1992 AAA 25 68 3.5
1993 AAA 22 45 4.2
1992 BBB 32 43 6.2
1991 CCC 1002 256 12.2
1992 CCC 1032 246 13.5
1993 CCC 1042 276 16.5
I learn from the SAS manual to write the following codes. But I do not know whether it is correct or not?
PROC GLM data=p1;
ABSORB company;
CLASS year;
MODEL invest= sale asset year/SOLUTION;
OUTPUT OUT=p2;
RUN; QUIT;
Q1: The above codes are correct, aren’t they?
Q2; I want to output the final regression results (including the R-square, F-values etc.) to one file(p2). However, the file (p2) resulted from the above procedure (codes) are the new DATA set. How do get the regression result (including the R-square, F-values etc.) which I want?
Q3. if some companies do not have one of variables (sale or asset), will it be deleted during the calculation,
Thank you
NEW USER (from Taiwan)