1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 /* MathReg2.sas */74 %include '/home/u1407221/441s24/SAS08/ReadLabelMath2.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: Format NCFMT is already on the library WORK.FORMATS.NOTE: Format NCFMT has been output.NOTE: PROCEDURE FORMAT used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 250.09kOS Memory 30116.00kTimestamp 02/23/2024 08:05:49 PMStep Count 124 Switch Count 0Page Faults 0Page Reclaims 26Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 32NOTE: The infile '/home/u1407221/441s24/data/math.data.txt' is:Filename=/home/u1407221/441s24/data/math.data.txt,Owner Name=u1407221,Group Name=oda,Access Permission=-rw-r--r--,Last Modified=10Feb2024:16:04:10,File Size (bytes)=90324NOTE: 1158 records were read from the infile '/home/u1407221/441s24/data/math.data.txt'.The minimum record length was 76.The maximum record length was 76.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).180 at 120:24NOTE: The data set WORK.MATH has 1158 observations and 37 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 1176.40kOS Memory 30888.00kTimestamp 02/23/2024 08:05:49 PMStep Count 125 Switch Count 2Page Faults 0Page Reclaims 167Page Swaps 0Voluntary Context Switches 19Involuntary Context Switches 0Block Input Operations 0Block Output Operations 776NOTE: There were 1158 observations read from the data set WORK.MATH.NOTE: The data set WORK.REPLIC has 579 observations and 37 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 1411.71kOS Memory 31276.00kTimestamp 02/23/2024 08:05:49 PMStep Count 126 Switch Count 2Page Faults 0Page Reclaims 155Page Swaps 0Voluntary Context Switches 15Involuntary Context Switches 0Block Input Operations 0Block Output Operations 520NOTE: There were 1158 observations read from the data set WORK.MATH.NOTE: The data set WORK.EXPLORE has 579 observations and 28 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 1407.28kOS Memory 31276.00kTimestamp 02/23/2024 08:05:49 PMStep Count 127 Switch Count 2Page Faults 0Page Reclaims 130Page Swaps 0Voluntary Context Switches 14Involuntary Context Switches 0Block Input Operations 0Block Output Operations 520235 title2 'Basic Regression Diagnostics';236237 proc reg data = explore plots(only) = ResidualPlot;238 title3 'Model I: hsgpa hscalc hsengl totscore mtongue';239 model grade = hsgpa hscalc hsengl totscore mtongue;240 output out = Explor H = hatval241 predicted = yhat242 residual = resid243 rstudent = delstud;244 /* Deleted Studentized Residual */245 /* Could have included LCL and UCL for upper and lower limits of a246 95% prediction interval for each case in the file */247248 /* proc contents; */249250 /* Rules of thumb say investigate x values for outliers if251 * Hat value > 3p/n (Is residual close to the error term?)252 * Hat value > 0.2 (Is betahat approximtely multivariate normal?) */253NOTE: The data set WORK.EXPLOR has 579 observations and 32 variables.NOTE: PROCEDURE REG used (Total process time):real time 0.43 secondsuser cpu time 0.23 secondssystem cpu time 0.03 secondsmemory 26998.03kOS Memory 54212.00kTimestamp 02/23/2024 08:05:49 PMStep Count 128 Switch Count 4Page Faults 0Page Reclaims 6457Page Swaps 0Voluntary Context Switches 354Involuntary Context Switches 0Block Input Operations 0Block Output Operations 3288254 proc iml;NOTE: IML Ready255 n = 289;255 ! p = 6;255 ! ceiling = 3*p/n;256 print "Investigate x if hat values are > 0.2 or greater than " ceiling;257NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.03 secondsuser cpu time 0.03 secondssystem cpu time 0.00 secondsmemory 1121.06kOS Memory 52656.00kTimestamp 02/23/2024 08:05:49 PMStep Count 129 Switch Count 0Page Faults 0Page Reclaims 199Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 144258 proc univariate plot data=Explor;259 var hatval;260 where grade ne .;261NOTE: PROCEDURE UNIVARIATE used (Total process time):real time 0.25 secondsuser cpu time 0.12 secondssystem cpu time 0.01 secondsmemory 4784.62kOS Memory 54448.00kTimestamp 02/23/2024 08:05:50 PMStep Count 130 Switch Count 3Page Faults 0Page Reclaims 933Page Swaps 0Voluntary Context Switches 342Involuntary Context Switches 1Block Input Operations 0Block Output Operations 928262 proc sgplot;263 histogram hatval;264 where grade ne .;265266 proc sort data=Explor;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.16 secondsuser cpu time 0.06 secondssystem cpu time 0.00 secondsmemory 3407.06kOS Memory 55216.00kTimestamp 02/23/2024 08:05:50 PMStep Count 131 Switch Count 7Page Faults 0Page Reclaims 689Page Swaps 0Voluntary Context Switches 265Involuntary Context Switches 0Block Input Operations 0Block Output Operations 592NOTE: There were 393 observations read from the data set WORK.EXPLOR.WHERE grade not = .;267 by hatval;NOTE: There were 579 observations read from the data set WORK.EXPLOR.NOTE: The data set WORK.EXPLOR has 579 observations and 32 variables.NOTE: PROCEDURE SORT used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 1711.56kOS Memory 55220.00kTimestamp 02/23/2024 08:05:50 PMStep Count 132 Switch Count 2Page Faults 0Page Reclaims 131Page Swaps 0Voluntary Context Switches 11Involuntary Context Switches 0Block Input Operations 0Block Output Operations 520268 proc print data = Explor;269 where hatval > 0.06228 and grade ne .;270 var id hatval hsgpa hscalc hsengl totscore mtongue grade delstud;271272 /* Try re-running the analysis without the two suspect observations */273NOTE: There were 2 observations read from the data set WORK.EXPLOR.WHERE (hatval>0.06228) and (grade not = .);NOTE: PROCEDURE PRINT used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 1129.53kOS Memory 54700.00kTimestamp 02/23/2024 08:05:50 PMStep Count 133 Switch Count 0Page Faults 0Page Reclaims 99Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 8274 proc reg plots=none data=explore;275 title3 'Re-running without participants 50 and 340';276 model grade = hsgpa hscalc hsengl totscore mtongue;277 where id ne 340 and id ne 50;278279 /* What is a big (Studentized deleted) residual? If the model is correct,280 each one has a t distribution with n-p-1 = 283 df (practically standard281 normal), so the Studentized deleted residual can be treated directly as282 a t-test statistic. Values that are too big in absolute value will cause283 rejection of the null hypothesis that x_i*beta is the same for this case284 and the other n-1 cases. Tests are NOT independent, but use a Bonferroni285 correction for n = 289 tests. Get the critical value from proc iml. */286NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 3358.37kOS Memory 56516.00kTimestamp 02/23/2024 08:05:50 PMStep Count 134 Switch Count 4Page Faults 0Page Reclaims 309Page Swaps 0Voluntary Context Switches 17Involuntary Context Switches 0Block Input Operations 0Block Output Operations 80287 proc iml;NOTE: IML Ready288 title3 'Critical value for Joint t-test on Studentized Deleted Residuals';289 Alpha = 0.05/289;289 ! print Alpha;290 Critval = tinv(1-Alpha/2,283);290 ! print Critval;291NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 577.21kOS Memory 54436.00kTimestamp 02/23/2024 08:05:50 PMStep Count 135 Switch Count 1Page Faults 0Page Reclaims 56Page Swaps 0Voluntary Context Switches 7Involuntary Context Switches 0Block Input Operations 0Block Output Operations 72292 proc univariate data=Explor normal plot;293 title3 'Studentized Deleted Residuals';294 var delstud;295296 /* Tests for normality indicate residuals are not normal. One st resid297 greater than critical value. */298NOTE: PROCEDURE UNIVARIATE used (Total process time):real time 0.24 secondsuser cpu time 0.13 secondssystem cpu time 0.01 secondsmemory 4142.53kOS Memory 56236.00kTimestamp 02/23/2024 08:05:50 PMStep Count 136 Switch Count 1Page Faults 0Page Reclaims 787Page Swaps 0Voluntary Context Switches 365Involuntary Context Switches 0Block Input Operations 0Block Output Operations 944299 proc print data=Explor;300 title3 'Large Negative Studentized Deleted Residual';301 where delstud < -3.81 and delstud ne .;302303 /* Next, a few more plots. */304NOTE: There were 1 observations read from the data set WORK.EXPLOR.WHERE (delstud<-3.81) and (delstud not = .);NOTE: PROCEDURE PRINT used (Total process time):real time 0.02 secondsuser cpu time 0.03 secondssystem cpu time 0.00 secondsmemory 1428.78kOS Memory 55468.00kTimestamp 02/23/2024 08:05:50 PMStep Count 137 Switch Count 1Page Faults 0Page Reclaims 99Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 40305 proc sgplot data=Explor;306 title3 'Plot of Y-hat by Y';307 scatter y=grade x=yhat;308309 proc sgplot data=Explor;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.16 secondsuser cpu time 0.08 secondssystem cpu time 0.01 secondsmemory 2849.96kOS Memory 56236.00kTimestamp 02/23/2024 08:05:50 PMStep Count 138 Switch Count 2Page Faults 0Page Reclaims 571Page Swaps 0Voluntary Context Switches 249Involuntary Context Switches 0Block Input Operations 0Block Output Operations 832NOTE: There were 579 observations read from the data set WORK.EXPLOR.310 title3 'Calculus sub-test by deleted studentized residual';311 scatter x=calc y=delstud;312313 proc sgplot data=Explor;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.16 secondsuser cpu time 0.07 secondssystem cpu time 0.01 secondsmemory 3403.25kOS Memory 56236.00kTimestamp 02/23/2024 08:05:50 PMStep Count 139 Switch Count 2Page Faults 0Page Reclaims 562Page Swaps 0Voluntary Context Switches 252Involuntary Context Switches 0Block Input Operations 0Block Output Operations 864NOTE: There were 579 observations read from the data set WORK.EXPLOR.314 title3 'Pre-calculus sub-test by deleted studentized residual';315 scatter x=precalc y=delstud;316317 proc sgplot data=Explor;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.14 secondsuser cpu time 0.07 secondssystem cpu time 0.00 secondsmemory 3387.75kOS Memory 56236.00kTimestamp 02/23/2024 08:05:51 PMStep Count 140 Switch Count 2Page Faults 0Page Reclaims 552Page Swaps 0Voluntary Context Switches 250Involuntary Context Switches 0Block Input Operations 0Block Output Operations 856NOTE: There were 579 observations read from the data set WORK.EXPLOR.318 title3 'Mother tongue by deleted studentized residual';319 scatter x=mtongue y=delstud;320321 quit;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.15 secondsuser cpu time 0.07 secondssystem cpu time 0.01 secondsmemory 3501.25kOS Memory 56236.00kTimestamp 02/23/2024 08:05:51 PMStep Count 141 Switch Count 2Page Faults 0Page Reclaims 554Page Swaps 0Voluntary Context Switches 253Involuntary Context Switches 0Block Input Operations 0Block Output Operations 856NOTE: There were 579 observations read from the data set WORK.EXPLOR.322323324 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;336