Hello~ guys~ I have a question about R-square using proc reg. My sample consists of daily data. I want to run regression by both group and year and to get R square by group. Data structure is as follows. group dept indpt1 indpt2 date year 1 19950101 1995 2 19960205 1996 3 19970310 1997 When I run the regression with following code, it generates residual=0 and Rsquare=1 for every observation. However, it should not be the case since I got positive R-square with part of the sample using another program . What is the problem of my code and how can I correct this problem? Any comments are appreciated. ------------------------------------------------------------------------------------------------------------------------------------------------------- proc sort data=examp; by group year; run; proc reg data = examp noprint tableout edf usscp outest = result_examp; by group year; model dpt = indpt1 indpt2; output out=result_R r=rsqr; run; Thank you.
... View more