1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 /* MathLogReg2.sas */
57 %include '/folders/myfolders/441s16/Lecture/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.01 seconds
cpu time 0.01 seconds
166 title2 'Predict Passing the course (Y-N) with Logistic Regression';
167
168 /* c1 = 'Catch-up' c2 = 'Mainstream' c3 = 'Elite' */
169
170
NOTE: The infile '/folders/myfolders/exploremath.data.txt' is:
Filename=/folders/myfolders/exploremath.data.txt,
Owner Name=root,Group Name=vboxsf,
Access Permission=-rwxrwx---,
Last Modified=18Jan2016:17:34:49,
File Size (bytes)=44583
NOTE: 579 records were read from the infile '/folders/myfolders/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 80:24 99 at 117:13
NOTE: The data set WORK.MATHEX has 579 observations and 34 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.04 seconds
171 proc logistic descending order=internal;
172 title3 'HS variables';
173 model passed = hsgpa hscalc hsengl;
174
175 /* Decision: Drop hsengl */
176
NOTE: PROC LOGISTIC is modeling the probability that passed='Yes'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.18 seconds
cpu time 0.17 seconds
177 proc logistic descending order=internal;
178 title3 'HS gpa and calc, course2 and diagnostic test';
179 class course2 / param=ref;
180 model passed = hsgpa hscalc course2 precalc calc;
181 contrast 'Course' course2 1 0,
182 course2 0 1;
183
NOTE: PROC LOGISTIC is modeling the probability that passed='Yes'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.19 seconds
cpu time 0.18 seconds
184 proc logistic descending order=internal;
185 title3 'HS gpa and calc, precalc and total score';
186 model passed = hsgpa hscalc precalc totscore;
187 precalc_n_totscore: test precalc = totscore = 0;
188
189 /* Decision: Keep precalc rather than totscore */
190
NOTE: PROC LOGISTIC is modeling the probability that passed='Yes'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.17 seconds
cpu time 0.16 seconds
191 proc logistic descending order=internal;
192 title3 'Try gender, ethnic and mother tongue controlling for good stuff';
193 class ethnic (param=ref ref='East Indian');
194 /* Specifying a reference category that's not the last value */
195 model passed = hsgpa hscalc precalc ethnic gender mtongue;
196 contrast 'Demographics' ethnic 1 0 0 0 0,
197 ethnic 0 1 0 0 0,
198 ethnic 0 0 1 0 0,
199 ethnic 0 0 0 1 0,
200 ethnic 0 0 0 0 1,
201 gender 1,
202 mtongue 1 / e;
203 /* Display the effect matrix */
204 /* Decision: Forget about gender and ethnicity. */
205
NOTE: PROC LOGISTIC is modeling the probability that passed='Yes'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.32 seconds
cpu time 0.30 seconds
206 proc logistic descending order=internal;
207 title3 'My model: HS gpa, HS calculus mark, and Precalculus subtest';
208 model passed = hsgpa hscalc precalc;
209
NOTE: PROC LOGISTIC is modeling the probability that passed='Yes'.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.16 seconds
cpu time 0.14 seconds
210 proc logistic descending order=internal;
211 title3 'Stepwise Logistic Regression';
212 class ethnic course / param=ref;
213 model passed = gender mtongue ethnic
214 hsgpa hscalc hsengl
215 course precalc calc totscore
216 / selection=stepwise slentry=0.05 slstay=0.05 ;
217
218
219
220
221
222 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
234