options ls=78;
data cls9;
infile 'class9.dat';
input sn income hsGPA SAT cGPA coyrs evaluation;
if (sn=109) then delete;
tcoyrs=sqrt(coyrs);
run;
proc print data=cls9;
run;
proc plot data=cls9;
plot income*hsGPA income*SAT income*cGPA income*coyrs income*tcoyrs income*evaluation;
title 'Scatterplots for All Variables by Income';
run;
proc corr data=cls9;
var income hsGPA SAT cGPA coyrs tcoyrs evaluation;
title 'Correlations for All Variables';
run;
proc reg data=cls9;
model income=tcoyrs;
var hsGPA SAT cGPA evaluation;
title 'Regression of Income by CoYrs';
run;
plot income*tcoyrs pred.*tcoyrs /overlay;
title 'Plot of Income by Company Years';
run;
plot r.*hsGPA;
title 'Plot of residuals by hs GPA';
run;
plot r.*SAT;
title 'Plot of residuals by SAT';
run;
plot r.*cGPA;
title 'Plot of residuals by c GPA';
run;
plot r.*evaluation;
title 'Plot of residuals by evaluation';
run;
proc reg data=cls9;
model income=tcoyrs SAT;
var hsGPA cGPA evaluation;
title 'Chrissy Regression by CoYrs and SAT';
run;
plot r.*pred.;
title 'Plot of residual by predicted';
run;
plot r.*hsGPA;
title 'Plot of residuals by hs GPA';
run;
plot r.*cGPA;
title 'Plot of residuals by c GPA';
run;
plot r.*evaluation;
title 'Plot of residuals by evaluation';
run;
proc reg data=cls9;
model income=tcoyrs SAT evaluation;
var hsGPA cGPA;
title 'Chrissy Regression by CoYrs, SAT, and Evaluation';
run;
plot r.*pred.;
title 'Plot of residual by predicted';
run;
plot r.*hsGPA;
title 'Plot of residuals by hs GPA';
run;
plot r.*cGPA;
title 'Plot of residuals by c GPA';
run;
proc reg data=cls9;
model income=tcoyrs SAT evaluation hsGPA;
var cGPA;
title 'Chrissy Regression by CoYrs, SAT, Evaluation, and hsGPA';
run;
plot r.*pred.;
title 'Plot of residual by predicted';
run;
plot r.*cGPA;
title 'Plot of residuals by c GPA';
run;
proc reg data=cls9;
model income=tcoyrs SAT evaluation hsGPA cGPA /r stb pcorr1 scorr1;
title 'Chrissy Regression by All Variables';
run;
plot r.*pred.;
title 'Plot of residual by predicted';
run;
quit;