1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7071 /* 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 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 244.34kOS Memory 29348.00kTimestamp 02/03/2020 05:33:48 PMStep Count 38 Switch Count 0Page Faults 0Page Reclaims 28Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 32176 /* readmath2b has dummy variable definitions177 e1-e4,e6 for ethnic (Reference category is East Indian)178 gender=1 for Female179 mtongue=1 for English180 c1-c3: c1 = 'Catch-up' c2 = 'Mainstream' c3 = 'Elite' */181182 title2 'Variable Selection for Predicting Grade';183NOTE: 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)=44583NOTE: 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:13NOTE: The data set WORK.MATHEX has 579 observations and 34 variables.NOTE: DATA statement used (Total process time):real time 0.06 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 873.15kOS Memory 29864.00kTimestamp 02/03/2020 05:33:48 PMStep Count 39 Switch Count 3Page Faults 0Page Reclaims 139Page Swaps 0Voluntary Context Switches 27Involuntary Context Switches 0Block Input Operations 0Block Output Operations 520184 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;190NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE FREQ used (Total process time):real time 0.22 secondsuser cpu time 0.22 secondssystem cpu time 0.01 secondsmemory 4035.93kOS Memory 31920.00kTimestamp 02/03/2020 05:33:48 PMStep Count 40 Switch Count 5Page Faults 0Page Reclaims 552Page Swaps 0Voluntary Context Switches 28Involuntary Context Switches 0Block Input Operations 0Block Output Operations 616191 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;194195 /* It is very interesting to know what proportion of the remaining196 variation is explained by each variable, controlling for the other two.197 F = t-squared, and198 a = sF/(n-p + sF)199 */200NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.05 secondssystem cpu time 0.00 secondsmemory 2751.59kOS Memory 33728.00kTimestamp 02/03/2020 05:33:48 PMStep Count 41 Switch Count 2Page Faults 0Page Reclaims 393Page Swaps 0Voluntary Context Switches 24Involuntary Context Switches 0Block Input Operations 0Block Output Operations 48201 proc iml;NOTE: IML Ready202 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;207208 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;211212 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;215NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.02 secondsuser cpu time 0.02 secondssystem cpu time 0.00 secondsmemory 629.25kOS Memory 32164.00kTimestamp 02/03/2020 05:33:48 PMStep Count 42 Switch Count 1Page Faults 0Page Reclaims 290Page Swaps 0Voluntary Context Switches 8Involuntary Context Switches 0Block Input Operations 0Block Output Operations 24216 proc reg plots = none;217 title3 'Model B: Predict University Calculus Grade from Diagnostic Test';218 model grade = precalc calc;219NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 2543.12kOS Memory 34240.00kTimestamp 02/03/2020 05:33:48 PMStep Count 43 Switch Count 2Page Faults 0Page Reclaims 303Page Swaps 0Voluntary Context Switches 22Involuntary Context Switches 0Block Input Operations 0Block Output Operations 48220 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;225NOTE: PROCEDURE REG used (Total process time):real time 0.07 secondsuser cpu time 0.08 secondssystem cpu time 0.00 secondsmemory 2548.78kOS Memory 34240.00kTimestamp 02/03/2020 05:33:49 PMStep Count 44 Switch Count 2Page Faults 0Page Reclaims 266Page Swaps 0Voluntary Context Switches 18Involuntary Context Switches 2Block Input Operations 0Block Output Operations 96226 proc iml;NOTE: IML Ready227 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;231NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 481.00kOS Memory 32420.00kTimestamp 02/03/2020 05:33:49 PMStep Count 45 Switch Count 1Page Faults 0Page Reclaims 133Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 8232 proc iml;NOTE: IML Ready233 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;237NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 483.78kOS Memory 32420.00kTimestamp 02/03/2020 05:33:49 PMStep Count 46 Switch Count 1Page Faults 0Page Reclaims 133Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 0238 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;243NOTE: PROCEDURE REG used (Total process time):real time 0.07 secondsuser cpu time 0.08 secondssystem cpu time 0.00 secondsmemory 2550.53kOS Memory 34240.00kTimestamp 02/03/2020 05:33:49 PMStep Count 47 Switch Count 2Page Faults 0Page Reclaims 257Page Swaps 0Voluntary Context Switches 23Involuntary Context Switches 0Block Input Operations 0Block Output Operations 80244 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;251NOTE: PROCEDURE GLM used (Total process time):real time 0.06 secondsuser cpu time 0.07 secondssystem cpu time 0.00 secondsmemory 1959.84kOS Memory 33720.00kTimestamp 02/03/2020 05:33:49 PMStep Count 48 Switch Count 3Page Faults 0Page Reclaims 346Page Swaps 0Voluntary Context Switches 22Involuntary Context Switches 0Block Input Operations 0Block Output Operations 304252 proc reg plots = none;253 title3 'Model E: Include Language, Sex and Ethnic Background';254 model grade = hsgpa hscalc hsengl precalc calc255 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;258NOTE: PROCEDURE REG used (Total process time):real time 0.08 secondsuser cpu time 0.08 secondssystem cpu time 0.01 secondsmemory 2651.00kOS Memory 34496.00kTimestamp 02/03/2020 05:33:49 PMStep Count 49 Switch Count 2Page Faults 0Page Reclaims 320Page Swaps 0Voluntary Context Switches 25Involuntary Context Switches 10Block Input Operations 0Block Output Operations 104259 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;263NOTE: PROCEDURE REG used (Total process time):real time 0.06 secondsuser cpu time 0.06 secondssystem cpu time 0.00 secondsmemory 2562.12kOS Memory 34496.00kTimestamp 02/03/2020 05:33:49 PMStep Count 50 Switch Count 2Page Faults 0Page Reclaims 264Page Swaps 0Voluntary Context Switches 21Involuntary Context Switches 3Block Input Operations 0Block Output Operations 72264 proc iml;NOTE: IML Ready265 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;269NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 483.28kOS Memory 32676.00kTimestamp 02/03/2020 05:33:49 PMStep Count 51 Switch Count 1Page Faults 0Page Reclaims 133Page Swaps 0Voluntary Context Switches 10Involuntary Context Switches 0Block Input Operations 0Block Output Operations 0270 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;274NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 2546.62kOS Memory 34752.00kTimestamp 02/03/2020 05:33:49 PMStep Count 52 Switch Count 3Page Faults 0Page Reclaims 293Page Swaps 0Voluntary Context Switches 34Involuntary Context Switches 0Block Input Operations 0Block Output Operations 56275 proc iml;NOTE: IML Ready276 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;280NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.02 secondssystem cpu time 0.00 secondsmemory 476.78kOS Memory 32932.00kTimestamp 02/03/2020 05:33:49 PMStep Count 53 Switch Count 1Page Faults 0Page Reclaims 133Page Swaps 0Voluntary Context Switches 9Involuntary Context Switches 0Block Input Operations 0Block Output Operations 24281 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;285NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 2544.71kOS Memory 34752.00kTimestamp 02/03/2020 05:33:49 PMStep Count 54 Switch Count 3Page Faults 0Page Reclaims 259Page Swaps 0Voluntary Context Switches 33Involuntary Context Switches 0Block Input Operations 0Block Output Operations 48286 proc iml;NOTE: IML Ready287 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";292NOTE: Exiting IML.NOTE: PROCEDURE IML used (Total process time):real time 0.01 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 528.50kOS Memory 32932.00kTimestamp 02/03/2020 05:33:49 PMStep Count 55 Switch Count 1Page Faults 0Page Reclaims 133Page Swaps 0Voluntary Context Switches 9Involuntary Context Switches 1Block Input Operations 0Block Output Operations 24293 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. */297NOTE: PROCEDURE REG used (Total process time):real time 0.04 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 2550.81kOS Memory 34752.00kTimestamp 02/03/2020 05:33:49 PMStep Count 56 Switch Count 2Page Faults 0Page Reclaims 261Page Swaps 0Voluntary Context Switches 23Involuntary Context Switches 0Block Input Operations 0Block Output Operations 48298 proc reg plots = none;299 title3 'Try automatic (stepwise) selection';300 model grade = hsgpa hscalc hsengl precalc calc totscore301 mtongue gender e1-e4 e6302 / 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 secondsuser cpu time 0.15 secondssystem cpu time 0.00 secondsmemory 2635.15kOS Memory 34752.00kTimestamp 02/03/2020 05:33:49 PMStep Count 57 Switch Count 2Page Faults 0Page Reclaims 269Page Swaps 0Voluntary Context Switches 20Involuntary Context Switches 12Block Input Operations 0Block Output Operations 120305306307 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;318