1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 /* mathlogreg4.sas */7475 %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.50kOS Memory 28836.00kTimestamp 03/10/2024 07:59:33 PMStep Count 123 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:17: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 121: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 1183.40kOS Memory 29608.00kTimestamp 03/10/2024 07:59:33 PMStep Count 124 Switch Count 2Page Faults 0Page Reclaims 162Page Swaps 0Voluntary Context Switches 17Involuntary Context Switches 0Block Input Operations 0Block Output Operations 784NOTE: 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 1412.18kOS Memory 29996.00kTimestamp 03/10/2024 07:59:33 PMStep Count 125 Switch Count 2Page Faults 0Page Reclaims 154Page Swaps 0Voluntary Context Switches 13Involuntary 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 1408.96kOS Memory 29996.00kTimestamp 03/10/2024 07:59:33 PMStep Count 126 Switch Count 2Page Faults 0Page Reclaims 130Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 520236 title2 'Prediction for the replication sample';237238 /* Where should we draw the line, and predict that the student will pass?239 In the exploratory sample, 52.68% passed overall, so find the240 pihat that cuts off the bottom 52.68%, and use that as a cutoff.241 There was a pihat right at the 52.68th percentile: 0.4063743825.242 If pihat > 0.406, predict the student will pass. For the record and243 before peeking, I predict 75% correct. */244245 data mathrep;246 set replic;247 if hsgpa+hscalc+precalc = . then missused = 1 ;248 else missused = 0;249 label missused = 'Any of hsgpa hscalc precalc missing';250 format missused ynfmt.;251 /* Pi-hat when predictors are not missing, from mathlogreg2 results */252 b0 = -14.7970; b1 = 0.1173; b2 = 0.0638; b3 = 0.2989;253 L = b0 + b1*hsgpa + b2*hscalc + b3*precalc;254 pihat = exp(L)/(1+exp(L));255 if missused=1 then pihat = 0.348;256 if pihat > 0.406 then Prediction = 'Pass ';257 else Prediction = 'Not Pass';258259 /* Check commented out260 proc means;261 title3 'Checking Prediction Variable: pihat > 0.406';262 class Prediction;263 var pihat;264 */265NOTE: 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).127 at 247:14 186 at 247:21 97 at 253:17 30 at 253:28 59 at 253:40 186 at 254:14 186 at 254:23186 at 254:24NOTE: There were 579 observations read from the data set WORK.REPLIC.NOTE: The data set WORK.MATHREP has 579 observations and 45 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 1328.43kOS Memory 29868.00kTimestamp 03/10/2024 07:59:33 PMStep Count 127 Switch Count 2Page Faults 0Page Reclaims 130Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 528266 proc freq data = mathrep;267 title2 'How good is the prediction?';268 tables Prediction*passed / nocol;269NOTE: There were 579 observations read from the data set WORK.MATHREP.NOTE: PROCEDURE FREQ used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.01 secondsmemory 3586.40kOS Memory 30640.00kTimestamp 03/10/2024 07:59:33 PMStep Count 128 Switch Count 5Page Faults 0Page Reclaims 306Page Swaps 0Voluntary Context Switches 27Involuntary Context Switches 1Block Input Operations 0Block Output Operations 536270 proc iml;NOTE: IML Ready271 PercentCorrect = 35.75 + 34.54;272 print PercentCorrect;273274 /* Prediction may be better at the extremes. */275NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.00 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 691.93kOS Memory 30116.00kTimestamp 03/10/2024 07:59:33 PMStep Count 129 Switch Count 0Page Faults 0Page Reclaims 207Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 0276 proc freq data = mathrep;277 tables pihat*passed / norow nocol nopercent;278 run;NOTE: There were 579 observations read from the data set WORK.MATHREP.NOTE: PROCEDURE FREQ used (Total process time):real time 0.66 secondsuser cpu time 0.66 secondssystem cpu time 0.00 secondsmemory 4063.12kOS Memory 33456.00kTimestamp 03/10/2024 07:59:34 PMStep Count 130 Switch Count 4Page Faults 0Page Reclaims 760Page Swaps 0Voluntary Context Switches 28Involuntary Context Switches 1Block Input Operations 0Block Output Operations 864279 quit;280281282 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;294