/* fitness2.sas */ options ls=72 ps=60; data fitness; infile 'fitness.dat'; input y x1 x2 x3 x4 x5 x6; /* y = oxygen x1 = age x2 = weight x3 = runtime x4 = restpulse x5 = runpulse x6 = maxpulse */ proc reg data=fitness; model y = x1-x6 / selection=forward slentry=.10 details; model y = x1-x6 / selection=backward slstay=.10 details; model y = x1-x6 / selection=stepwise slentry=.10 slstay=.10 details; title 'sequential selection methods'; proc reg data=fitness; model y = x3 / ss1 ss2; output out=model03 p=yhat r=resid; title 'model with x0 and x3'; proc plot data=model03; plot resid*yhat / vref=0; plot resid*x3 / vref=0; proc print data=model03; var y x3 yhat resid; proc univariate data=model03 plot normal; var resid; proc rank data=model03 normal=blom out=new1; var resid; ranks normsc; proc print data=new1; var resid normsc; proc plot data=new1; plot resid*normsc; proc reg data=fitness; model y = x3 x1 / seqb ss1 ss2; output out=model013 p=yhat r=resid; title 'model with x0 x1 and x3'; proc plot data=model013; plot resid*yhat / vref=0; plot resid*x3 / vref=0; plot resid*x1 / vref=0; proc print data=model013; var y x1 x3 yhat resid; proc reg data=fitness; model y = x3 x5 / seqb ss1 ss2; output out=model035 p=yhat r=resid; title 'model with x0 x3 and x5'; proc plot data=model035; plot resid*yhat / vref=0; plot resid*x3 / vref=0; plot resid*x5 / vref=0; proc print data=model035; var y x3 x5 yhat resid; proc reg data=fitness; model y = x3 x5 x1 / seqb ss1 ss2; output out=model0135 p=yhat r=resid; title 'model with x0 x1 x3 and x5'; proc plot data=model0135; plot resid*yhat / vref=0; plot resid*x1 / vref=0; plot resid*x3 / vref=0; plot resid*x5 / vref=0; proc print data=model0135; var y x1 x3 x5 yhat resid; proc univariate data=model0135 plot normal; var resid; proc rank data=model0135 normal=blom out=new2; var resid; ranks normsc; proc print data=new2; var resid normsc; proc plot data=new2; plot resid*normsc; proc reg data=fitness; model y = x3 x5 x6 / seqb ss1 ss2; output out=model0356 p=yhat r=resid; title 'model with x0 x3 x5 and x6'; proc plot data=model0356; plot resid*yhat / vref=0; plot resid*x3 / vref=0; plot resid*x5 / vref=0; plot resid*x6 / vref=0; proc print data=model0356; var y x3 x5 x6 yhat resid; run;