1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 /* MathReg2.sas */57 %include '/folders/myfolders/441s16/Lecture/readmath2b.sas';NOTE: Format YNFMT is already on the library WORK.FORMATS.NOTE: Format YNFMT has been output.NOTE: Format CRSFMT is already on the library WORK.FORMATS.NOTE: Format CRSFMT has been output.NOTE: Format NFMT is already on the library WORK.FORMATS.NOTE: Format NFMT has been output.NOTE: PROCEDURE FORMAT used (Total process time):real time 0.00 secondscpu time 0.00 seconds159 title2 'Residual analysis';160NOTE: The infile '/folders/myfolders/exploremath.data.txt' is:Filename=/folders/myfolders/exploremath.data.txt,Owner Name=root,Group Name=vboxsf,Access Permission=-rwxrwx---,Last Modified=18Jan2016:17:34:49,File Size (bytes)=44583NOTE: 579 records were read from the infile '/folders/myfolders/exploremath.data.txt'.The minimum record length was 75.The maximum record length was 75.NOTE: Missing values were generated as a result of performing an operation on missing values.Each place is given by: (Number of times) at (Line):(Column).99 at 80:24 99 at 117:13NOTE: The data set WORK.MATHEX has 579 observations and 34 variables.NOTE: DATA statement used (Total process time):real time 0.01 secondscpu time 0.01 seconds161 proc reg plots(only) = ResidualPlot;162 title3 'Model H: hsgpa hscalc hsengl totscore';163 model grade = hsgpa hscalc hsengl totscore;164 output out = Explor predicted = yhat165 residual = resid166 rstudent = delstud;167 /* Deleted Studentized Residual */168169 /* Could have included LCL and UCL for upper and lower limits of a170 95% prediction interval for each case in the file */171172173 /* What is a big (Studentized deleted) residual? If the model is correct,174 each one has a t distribution with n-p-1 = 283 df (practically standard175 normal), so the Studentized deleted residual can be treated directly as176 a t-test statistic. Values that are too big in absolute value will cause177 H0: mu=0 to be rejected. Tests are NOT independent, but use a Bonferroni178 correction for n = 289 tests. Get the critical value from proc iml. */179NOTE: The data set WORK.EXPLOR has 579 observations and 37 variables.NOTE: PROCEDURE REG used (Total process time):real time 0.59 secondscpu time 0.27 seconds180 proc iml;NOTE: IML Ready181 title3 'Critical value for Joint t-test on Studentized Residuals';182 Alpha = 0.05/289;182 ! print Alpha;183 Critval = tinv(1-Alpha/2,283);183 ! print Critval;184NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.04 secondscpu time 0.04 seconds185 proc univariate normal plot;186 var delstud;187188 /* Tests for normality indicate residuals are not normal. No st resids189 greater than critical value. Next, a few more plots. */190NOTE: PROCEDURE UNIVARIATE used (Total process time):real time 0.49 secondscpu time 0.19 seconds191 proc sgplot;192 title3 'Plot of Y-hat by Y';193 scatter y=grade x=yhat;194195 proc sgplot;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.24 secondscpu time 0.10 secondsNOTE: There were 579 observations read from the data set WORK.EXPLOR.196 title3 'Calculus sub-test by deleted studentized residual';197 scatter x=calc y=delstud;198199 proc sgplot;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.22 secondscpu time 0.10 secondsNOTE: There were 579 observations read from the data set WORK.EXPLOR.200 title3 'Pre-calculus sub-test by deleted studentized residual';201 scatter x=precalc y=delstud;202203 proc sgplot;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.24 secondscpu time 0.10 secondsNOTE: There were 579 observations read from the data set WORK.EXPLOR.204 title3 'Mother tongue by deleted studentized residual';205 scatter x=mtongue y=delstud;206207208209 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;221