1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /* mathlogreg4.sas */
74
75 %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 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 250.50k
OS Memory 28836.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 123 Switch Count 0
Page Faults 0
Page Reclaims 26
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 32
NOTE: 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)=90324
NOTE: 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:24
NOTE: The data set WORK.MATH has 1158 observations and 37 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 1183.40k
OS Memory 29608.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 124 Switch Count 2
Page Faults 0
Page Reclaims 162
Page Swaps 0
Voluntary Context Switches 17
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 784
NOTE: 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 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1412.18k
OS Memory 29996.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 125 Switch Count 2
Page Faults 0
Page Reclaims 154
Page Swaps 0
Voluntary Context Switches 13
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 520
NOTE: 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 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 1408.96k
OS Memory 29996.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 126 Switch Count 2
Page Faults 0
Page Reclaims 130
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 520
236 title2 'Prediction for the replication sample';
237
238 /* Where should we draw the line, and predict that the student will pass?
239 In the exploratory sample, 52.68% passed overall, so find the
240 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 and
243 before peeking, I predict 75% correct. */
244
245 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';
258
259 /* Check commented out
260 proc means;
261 title3 'Checking Prediction Variable: pihat > 0.406';
262 class Prediction;
263 var pihat;
264 */
265
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).
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:23
186 at 254:24
NOTE: 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 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1328.43k
OS Memory 29868.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 127 Switch Count 2
Page Faults 0
Page Reclaims 130
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 528
266 proc freq data = mathrep;
267 title2 'How good is the prediction?';
268 tables Prediction*passed / nocol;
269
NOTE: There were 579 observations read from the data set WORK.MATHREP.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.01 seconds
memory 3586.40k
OS Memory 30640.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 128 Switch Count 5
Page Faults 0
Page Reclaims 306
Page Swaps 0
Voluntary Context Switches 27
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 536
270 proc iml;
NOTE: IML Ready
271 PercentCorrect = 35.75 + 34.54;
272 print PercentCorrect;
273
274 /* Prediction may be better at the extremes. */
275
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 691.93k
OS Memory 30116.00k
Timestamp 03/10/2024 07:59:33 PM
Step Count 129 Switch Count 0
Page Faults 0
Page Reclaims 207
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
276 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 seconds
user cpu time 0.66 seconds
system cpu time 0.00 seconds
memory 4063.12k
OS Memory 33456.00k
Timestamp 03/10/2024 07:59:34 PM
Step Count 130 Switch Count 4
Page Faults 0
Page Reclaims 760
Page Swaps 0
Voluntary Context Switches 28
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 864
279 quit;
280
281
282 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
294