1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 /* MathReg1.sas */
72 %include '/home/brunner0/441s20/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 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 244.34k
OS Memory 29348.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 38 Switch Count 0
Page Faults 0
Page Reclaims 28
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 32
176 /* readmath2b has dummy variable definitions
177 e1-e4,e6 for ethnic (Reference category is East Indian)
178 gender=1 for Female
179 mtongue=1 for English
180 c1-c3: c1 = 'Catch-up' c2 = 'Mainstream' c3 = 'Elite' */
181
182 title2 'Variable Selection for Predicting Grade';
183
NOTE: The infile '/home/brunner0/441s20/exploremath.data.txt' is:
Filename=/home/brunner0/441s20/exploremath.data.txt,
Owner Name=brunner0,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=26Jan2020:18:49:34,
File Size (bytes)=44583
NOTE: 579 records were read from the infile '/home/brunner0/441s20/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 95:24 99 at 134:13
NOTE: The data set WORK.MATHEX has 579 observations and 34 variables.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 873.15k
OS Memory 29864.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 39 Switch Count 3
Page Faults 0
Page Reclaims 139
Page Swaps 0
Voluntary Context Switches 27
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 520
184 proc freq;
185 title3 'Check dummy variables';
186 tables sex*gender / norow nocol nopercent missing;
187 tables tongue*mtongue / norow nocol nopercent missing;
188 tables (e1-e4 e6) * ethnic / norow nocol nopercent missing;
189 tables (c1-c3) * course / norow nocol nopercent missing;
190
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.22 seconds
user cpu time 0.22 seconds
system cpu time 0.01 seconds
memory 4035.93k
OS Memory 31920.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 40 Switch Count 5
Page Faults 0
Page Reclaims 552
Page Swaps 0
Voluntary Context Switches 28
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 616
191 proc reg plots = none; /* Suppress diagnostic plots for now*/
192 title3 'Model A: Predict University Calculus Grade from HS Information';
193 model grade = hsgpa hscalc hsengl;
194
195 /* It is very interesting to know what proportion of the remaining
196 variation is explained by each variable, controlling for the other two.
197 F = t-squared, and
198 a = sF/(n-p + sF)
199 */
200
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.05 seconds
system cpu time 0.00 seconds
memory 2751.59k
OS Memory 33728.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 41 Switch Count 2
Page Faults 0
Page Reclaims 393
Page Swaps 0
Voluntary Context Switches 24
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 48
201 proc iml;
NOTE: IML Ready
202 title3 'Proportion of remaining variation for HS information';
203 n = 323;
203 ! p = 4;
203 ! s = 1;
204 print "hsgpa controlling for hscalc and hsengl";
205 t = 8.00;
205 ! F = t**2;
205 ! a = s*F/(n-p + s*F);
206 print a;
207
208 print "hscalc controlling for hsgpa and hsengl";
209 t = 3.14;
209 ! F = t**2;
209 ! a = s*F/(n-p + s*F);
210 print a;
211
212 print "hsengl controlling for hsgpa and hscalc";
213 t = -3.26;
213 ! F = t**2;
213 ! a = s*F/(n-p + s*F);
214 print a;
215
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.02 seconds
user cpu time 0.02 seconds
system cpu time 0.00 seconds
memory 629.25k
OS Memory 32164.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 42 Switch Count 1
Page Faults 0
Page Reclaims 290
Page Swaps 0
Voluntary Context Switches 8
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 24
216 proc reg plots = none;
217 title3 'Model B: Predict University Calculus Grade from Diagnostic Test';
218 model grade = precalc calc;
219
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2543.12k
OS Memory 34240.00k
Timestamp 02/03/2020 05:33:48 PM
Step Count 43 Switch Count 2
Page Faults 0
Page Reclaims 303
Page Swaps 0
Voluntary Context Switches 22
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 48
220 proc reg plots = none;
221 title3 'Model C: Do the diagnostic test and HS info both contribute?';
222 model grade = hsgpa hscalc hsengl precalc calc;
223 Diagnostic_Test: test precalc=calc=0;
224 HS_Information: test hsgpa=hscalc=hsengl=0;
225
NOTE: PROCEDURE REG used (Total process time):
real time 0.07 seconds
user cpu time 0.08 seconds
system cpu time 0.00 seconds
memory 2548.78k
OS Memory 34240.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 44 Switch Count 2
Page Faults 0
Page Reclaims 266
Page Swaps 0
Voluntary Context Switches 18
Involuntary Context Switches 2
Block Input Operations 0
Block Output Operations 96
226 proc iml;
NOTE: IML Ready
227 title3 'Proportion of remaining variation explained by diagnostic test';
228 print "Precalc and calc controlling for hsgpa hscalc hsengl";
229 n = 289;
229 ! p = 6;
229 ! s = 2;
229 ! F = 8.28;
230 a = s*F/(n-p + s*F);
230 ! print a;
231
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.01 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 481.00k
OS Memory 32420.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 45 Switch Count 1
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
232 proc iml;
NOTE: IML Ready
233 title3 'Proportion of remaining variation explained by HS info';
234 print "Hsgpa hscalc hsengl controlling for precalc and calc";
235 n = 289;
235 ! p = 6;
235 ! s = 3;
235 ! F = 46.97;
236 a = s*F/(n-p + s*F);
236 ! print a;
237
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.01 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 483.78k
OS Memory 32420.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 46 Switch Count 1
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
238 proc reg plots = none;
239 title3 'Model D: See if Course makes a contribution';
240 model grade = hsgpa hscalc hsengl precalc calc c1 c3;
241 Course: test c1=c3=0;
242 Diagnostic_Test: test precalc=calc=0;
243
NOTE: PROCEDURE REG used (Total process time):
real time 0.07 seconds
user cpu time 0.08 seconds
system cpu time 0.00 seconds
memory 2550.53k
OS Memory 34240.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 47 Switch Count 2
Page Faults 0
Page Reclaims 257
Page Swaps 0
Voluntary Context Switches 23
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 80
244 proc glm;
245 title3 'Model D again with proc glm';
246 class course;
247 model grade = hsgpa hscalc hsengl precalc calc course;
248 contrast 'Replicate Test of Course' course 1 -1 0,
249 course 0 1 -1;
250 contrast 'Diagnostic Test F = 9.06' precalc 1, calc 1;
251
NOTE: PROCEDURE GLM used (Total process time):
real time 0.06 seconds
user cpu time 0.07 seconds
system cpu time 0.00 seconds
memory 1959.84k
OS Memory 33720.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 48 Switch Count 3
Page Faults 0
Page Reclaims 346
Page Swaps 0
Voluntary Context Switches 22
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 304
252 proc reg plots = none;
253 title3 'Model E: Include Language, Sex and Ethnic Background';
254 model grade = hsgpa hscalc hsengl precalc calc
255 mtongue gender e1-e4 e6;
256 TroubleVars: test mtongue=gender=e1=e2=e3=e4=e6=0;
257 Nationality: test e1=e2=e3=e4=e6=0;
258
NOTE: PROCEDURE REG used (Total process time):
real time 0.08 seconds
user cpu time 0.08 seconds
system cpu time 0.01 seconds
memory 2651.00k
OS Memory 34496.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 49 Switch Count 2
Page Faults 0
Page Reclaims 320
Page Swaps 0
Voluntary Context Switches 25
Involuntary Context Switches 10
Block Input Operations 0
Block Output Operations 104
259 proc reg plots = none;
260 title3 'Model F: Discarding Gender and Nationality';
261 model grade = hsgpa hscalc hsengl precalc calc mtongue;
262 EnglishTongue: test hsengl=mtongue=0;
263
NOTE: PROCEDURE REG used (Total process time):
real time 0.06 seconds
user cpu time 0.06 seconds
system cpu time 0.00 seconds
memory 2562.12k
OS Memory 34496.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 50 Switch Count 2
Page Faults 0
Page Reclaims 264
Page Swaps 0
Voluntary Context Switches 21
Involuntary Context Switches 3
Block Input Operations 0
Block Output Operations 72
264 proc iml;
NOTE: IML Ready
265 title3 'Proportion of remaining variation explained by mother tongue';
266 print "Mtongue controlling for hsgpa hscalc hsengl precalc calc";
267 n = 287;
267 ! p = 7;
267 ! s = 1;
267 ! t = -2.23 ;
267 ! F = t**2;
268 a = s*F/(n-p + s*F);
268 ! print a;
269
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.01 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 483.28k
OS Memory 32676.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 51 Switch Count 1
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
270 proc reg plots = none;
271 title3 'Model G: Drop mtongue and calc';
272 title4 'Compare R-Square = 0.4556, Adj R-Sq = 0.4460 From Model 3';
273 model grade = hsgpa hscalc hsengl precalc;
274
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2546.62k
OS Memory 34752.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 52 Switch Count 3
Page Faults 0
Page Reclaims 293
Page Swaps 0
Voluntary Context Switches 34
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 56
275 proc iml;
NOTE: IML Ready
276 title3 'Proportion of remaining variation explained by Pre-calculus';
277 print "precalc controlling for hsgpa hscalc hsengl";
278 n = 289;
278 ! p = 5;
278 ! s = 1;
278 ! t = 3.63 ;
278 ! F = t**2;
279 a = s*F/(n-p + s*F);
279 ! print a;
280
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.01 seconds
user cpu time 0.02 seconds
system cpu time 0.00 seconds
memory 476.78k
OS Memory 32932.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 53 Switch Count 1
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 24
281 proc reg plots = none;
282 title3 'Model H: Combine precalc and calc instead of dropping calc';
283 title4 'Compare R-Square = 0.4492 from Model G';
284 model grade = hsgpa hscalc hsengl totscore;
285
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2544.71k
OS Memory 34752.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 54 Switch Count 3
Page Faults 0
Page Reclaims 259
Page Swaps 0
Voluntary Context Switches 33
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 48
286 proc iml;
NOTE: IML Ready
287 title3 'Proportion of remaining variation explained by Pre-calculus';
288 print "totscore controlling for hsgpa hscalc hsengl";
289 n = 289;
289 ! p = 5;
289 ! s = 1;
289 ! t = 3.92 ;
289 ! F = t**2;
290 a = s*F/(n-p + s*F);
290 ! print a;
291 print "For prediction, I am happy with Model H: hsgpa hscalc hsengl totscore";
292
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.01 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 528.50k
OS Memory 32932.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 55 Switch Count 1
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 24
293 proc reg plots = none;
294 title3 'Model I: Same as Model H but including Mother Tongue';
295 model grade = hsgpa hscalc hsengl totscore mtongue;
296 /* A slightly better model except for the lawsuit. */
297
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 2550.81k
OS Memory 34752.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 56 Switch Count 2
Page Faults 0
Page Reclaims 261
Page Swaps 0
Voluntary Context Switches 23
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 48
298 proc reg plots = none;
299 title3 'Try automatic (stepwise) selection';
300 model grade = hsgpa hscalc hsengl precalc calc totscore
301 mtongue gender e1-e4 e6
302 / selection = stepwise slentry = 0.05 slstay = 0.05 ;
303 /* Default slentry = slstay = 0.15 */
304 quit;
NOTE: PROCEDURE REG used (Total process time):
real time 0.15 seconds
user cpu time 0.15 seconds
system cpu time 0.00 seconds
memory 2635.15k
OS Memory 34752.00k
Timestamp 02/03/2020 05:33:49 PM
Step Count 57 Switch Count 2
Page Faults 0
Page Reclaims 269
Page Swaps 0
Voluntary Context Switches 20
Involuntary Context Switches 12
Block Input Operations 0
Block Output Operations 120
305
306
307 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
318