我用PROC MIXED对数据进行了分析,并得出了回归方程,但我需要把原数据的散点图和回归方程的图形画在同一张图上,本应该是很多点和一条线,但是我画出来的回归方程的图形却是这样的:
我回归的图形是一条看似像线的点云,但回归图形不应该是一条直线么?
我的代码是这样写得:
DATA HW;
drop x4-x7;
infile 'E:\MACS.DATA';
input time count age x4-x7 id;
time2=time**2;
run;
proc mixed data=HW;
class id;
model count = time time2 age/s outpm=predm;
random int time/subject=id;
run;
symbol1 v=point i=none r=370;
proc gplot data=predm;
plot pred * time count * time / overlay;
run;
原始数据是这个形式的:
-0.741958 548 6.57 0 0 5 8 10002
-0.246407 893 6.57 0 1 5 2 10002
0.243669 657 6.57 0 1 5 -1 10002
-2.729637 464 6.95 0 1 5 4 10005
-2.250513 845 6.95 0 1 5 -4 10005
-0.221766 752 6.95 0 1 5 -5 10005
0.221766 459 6.95 0 1 5 2 10005
0.774812 181 6.95 0 1 5 -3 10005
1.256673 434 6.95 0 1 5 -7 10005
-1.240246 846 2.64 0 1 5 18 10029
-0.741958 1102 2.64 0 1 5 18 10029
-0.251882 801 2.64 0 1 5 38 10029
0.251882 824 2.64 0 1 5 7 10029
0.769336 866 2.64 0 1 5 15 10029
1.412731 704 2.64 0 1 5 21 10029
1.806982 757 2.64 0 1 5 25 10029
2.420260 726 2.64 0 1 5 29 10029
-1.393566 1277 11.28 3 1 -4 -7 10039
-0.720055 1132 11.28 3 0 -2 -5 10039
-0.260096 1454 11.28 3 1 -3 -6 10039
0.260096 738 11.28 3 0 -4 -7 10039
原始数据一共有2000多个观测值,有300多个总体
求高手指点怎么画这个图