reg6_9.sas

来自「黄燕 吴平《SAS统计分析及应用》 书中一些例子的SAS程序代码」· SAS 代码 · 共 27 行

SAS
27
字号
data reg6_9;
  t1=0;
  t2=0;
  do i=1 to 6;
    input x y  @@;
    x1=log(x);
    y1=log(y);
    yhat1=-41.16419+18.52833*x1;
    resid1=y-yhat1;  
    t1=t1+resid1*resid1;  
    scrs1=t1;
    yhat2=exp(1.81133+0.40449*x1); 
    resid2=y-yhat2;  
    t2=t2+resid2*resid2;  
    scrs2=t2;
    output;  
  end;  
  drop i t;
cards;
25 20 50 30.5 100 47  200 52.0 400 67  800 87 
;
proc plot;
  plot y*x='*'  yhat1*x='p' yhat2*x='A' /overlay;
run;
quit;
proc print;
run;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?