1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 /* basicmath.sas */
63 %include '/folders/myfolders/441s18/Lecture/mathread1.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
cpu time 0.00 seconds
177
NOTE: The infile '/folders/myfolders/441s18/Lecture/exploremath.data.txt' is:
Filename=/folders/myfolders/441s18/Lecture/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/441s18/Lecture/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 100:24 99 at 101:18
NOTE: The data set WORK.MATHEX has 579 observations and 25 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
178 proc freq;
179 title3 'Frequency distributions of categorical variables';
180 tables sex gender ethnic tongue course passed gsplit;
181
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.12 seconds
cpu time 0.11 seconds
182 proc means;
183 title3 'Basic Descriptive Statistics on Quantitative Variables';
184 var hsgpa hscalc hsengl calc precalc totscore diff grade;
185
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
186 proc univariate normal plot;
187 var grade;
188
189 /* Explore with elementary tests */
190
NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 0.83 seconds
cpu time 0.25 seconds
191 proc means n mean stddev t probt;
192 title3 'Calculus vs. Pre-calculus scale';
193 var diff;
194
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
195 proc freq;
196 title3 'Some Relationships between categorical variables';
197 tables tongue*sex / chisq;
198 tables ethnic*sex / nocol nopercent chisq;
199 tables sex*course / nocol nopercent chisq;
200 tables ethnic * tongue / nocol nopercent chisq;
201
202 /* Follow up ethnic * tongue to seek directional conclusions */
203
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.18 seconds
cpu time 0.17 seconds
204 proc freq;
205 title3 'Ethnic by Tongue: Asians vs. Eastern Europeans';
206 where ethnic = 1 or ethnic = 2;
207 tables ethnic * tongue / nocol nopercent chisq;
208
NOTE: There were 194 observations read from the data set WORK.MATHEX.
WHERE ethnic in (1, 2);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
209 proc freq;
210 title3 'Ethnic by Tongue: Asians vs. Other Europeans';
211 where ethnic = 1 or ethnic = 3;
212 tables ethnic * tongue / nocol nopercent chisq;
213
NOTE: There were 326 observations read from the data set WORK.MATHEX.
WHERE ethnic in (1, 3);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
214 proc freq;
215 title3 'Ethnic by Tongue: Asians vs. Middle East';
216 where ethnic = 1 or ethnic = 4;
217 tables ethnic * tongue / nocol nopercent chisq;
218
NOTE: There were 203 observations read from the data set WORK.MATHEX.
WHERE ethnic in (1, 4);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.05 seconds
219 proc freq;
220 title3 'Ethnic by Tongue: Asians vs. East Indian';
221 where ethnic = 1 or ethnic = 5;
222 tables ethnic * tongue / nocol nopercent chisq;
223
NOTE: There were 209 observations read from the data set WORK.MATHEX.
WHERE ethnic in (1, 5);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
224 proc freq;
225 title3 'Ethnic by Tongue: Asians vs. Other / DK';
226 where ethnic = 1 or ethnic = 6;
227 tables ethnic * tongue / nocol nopercent chisq;
228
NOTE: There were 171 observations read from the data set WORK.MATHEX.
WHERE ethnic in (1, 6);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
229 proc freq;
230 title3 'Eastern European vs. Other European';
231 where ethnic = 2 or ethnic = 3;
232 tables ethnic * tongue / nocol nopercent chisq;
233
NOTE: There were 258 observations read from the data set WORK.MATHEX.
WHERE ethnic in (2, 3);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.04 seconds
234 proc freq;
235 title3 'Eastern European vs. Middle Eastern';
236 where ethnic = 2 or ethnic = 4;
237 tables ethnic * tongue / nocol nopercent chisq;
238
239 /* And so on. There are 6 choose 2 = 15 pairwise comparisons */
240
241 /* Passing the course is an important response variable*/
242
NOTE: There were 135 observations read from the data set WORK.MATHEX.
WHERE ethnic in (2, 4);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
243 proc freq;
244 title3 'Passing the course';
245 tables (sex ethnic tongue course) * passed / nocol nopercent chisq;
246
247 /* Categorical Predictors of Grade, one at a time */
248
NOTE: There were 579 observations read from the data set WORK.MATHEX.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.17 seconds
cpu time 0.15 seconds
249 proc glm;
250 title3 'Sex and Grade';
251 class gender; /* Could have used sex instead */
252 model grade=gender;
253
NOTE: PROCEDURE GLM used (Total process time):
real time 0.38 seconds
cpu time 0.15 seconds
254 proc glm;
255 title3 'Ethnic and Grade';
256 class ethnic;
257 model grade=ethnic;
258
NOTE: PROCEDURE GLM used (Total process time):
real time 0.41 seconds
cpu time 0.17 seconds
259 proc glm;
260 title3 'Mother tongue and Grade';
261 class tongue;
262 model grade=tongue;
263 means tongue; /* Means broken down by tongue */
264
NOTE: PROCEDURE GLM used (Total process time):
real time 0.61 seconds
cpu time 0.23 seconds
265 proc glm;
266 title3 'Course and Grade';
267 class course;
268 model grade=course;
269
270 /* Relationships between quantitative variables*/
271
NOTE: PROCEDURE GLM used (Total process time):
real time 0.38 seconds
cpu time 0.13 seconds
272 proc corr;
273 title3 'Correlations between quantitative variables';
274 var hsgpa hscalc hsengl calc precalc totscore diff grade passed;
275
NOTE: PROCEDURE CORR used (Total process time):
real time 0.16 seconds
cpu time 0.15 seconds
276 proc reg plots = none;
277 title3 'Preliminary regression on grade try 1: Initial sample size is n=579';
278 model grade = gender mtongue e1-e4 e6 c1 c3 hsgpa hscalc hsengl calc precalc totscore;
279
280
281
282 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
295