1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;6162 /* 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 secondscpu time 0.00 seconds177NOTE: 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)=44583NOTE: 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:18NOTE: The data set WORK.MATHEX has 579 observations and 25 variables.NOTE: DATA statement used (Total process time):real time 0.01 secondscpu time 0.01 seconds178 proc freq;179 title3 'Frequency distributions of categorical variables';180 tables sex gender ethnic tongue course passed gsplit;181NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE FREQ used (Total process time):real time 0.12 secondscpu time 0.11 seconds182 proc means;183 title3 'Basic Descriptive Statistics on Quantitative Variables';184 var hsgpa hscalc hsengl calc precalc totscore diff grade;185NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE MEANS used (Total process time):real time 0.06 secondscpu time 0.05 seconds186 proc univariate normal plot;187 var grade;188189 /* Explore with elementary tests */190NOTE: PROCEDURE UNIVARIATE used (Total process time):real time 0.83 secondscpu time 0.25 seconds191 proc means n mean stddev t probt;192 title3 'Calculus vs. Pre-calculus scale';193 var diff;194NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE MEANS used (Total process time):real time 0.03 secondscpu time 0.03 seconds195 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;201202 /* Follow up ethnic * tongue to seek directional conclusions */203NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE FREQ used (Total process time):real time 0.18 secondscpu time 0.17 seconds204 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;208NOTE: 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 secondscpu time 0.06 seconds209 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;213NOTE: 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 secondscpu time 0.05 seconds214 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;218NOTE: 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 secondscpu time 0.05 seconds219 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;223NOTE: 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 secondscpu time 0.05 seconds224 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;228NOTE: 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 secondscpu time 0.05 seconds229 proc freq;230 title3 'Eastern European vs. Other European';231 where ethnic = 2 or ethnic = 3;232 tables ethnic * tongue / nocol nopercent chisq;233NOTE: 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 secondscpu time 0.04 seconds234 proc freq;235 title3 'Eastern European vs. Middle Eastern';236 where ethnic = 2 or ethnic = 4;237 tables ethnic * tongue / nocol nopercent chisq;238239 /* And so on. There are 6 choose 2 = 15 pairwise comparisons */240241 /* Passing the course is an important response variable*/242NOTE: 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 secondscpu time 0.05 seconds243 proc freq;244 title3 'Passing the course';245 tables (sex ethnic tongue course) * passed / nocol nopercent chisq;246247 /* Categorical Predictors of Grade, one at a time */248NOTE: There were 579 observations read from the data set WORK.MATHEX.NOTE: PROCEDURE FREQ used (Total process time):real time 0.17 secondscpu time 0.15 seconds249 proc glm;250 title3 'Sex and Grade';251 class gender; /* Could have used sex instead */252 model grade=gender;253NOTE: PROCEDURE GLM used (Total process time):real time 0.38 secondscpu time 0.15 seconds254 proc glm;255 title3 'Ethnic and Grade';256 class ethnic;257 model grade=ethnic;258NOTE: PROCEDURE GLM used (Total process time):real time 0.41 secondscpu time 0.17 seconds259 proc glm;260 title3 'Mother tongue and Grade';261 class tongue;262 model grade=tongue;263 means tongue; /* Means broken down by tongue */264NOTE: PROCEDURE GLM used (Total process time):real time 0.61 secondscpu time 0.23 seconds265 proc glm;266 title3 'Course and Grade';267 class course;268 model grade=course;269270 /* Relationships between quantitative variables*/271NOTE: PROCEDURE GLM used (Total process time):real time 0.38 secondscpu time 0.13 seconds272 proc corr;273 title3 'Correlations between quantitative variables';274 var hsgpa hscalc hsengl calc precalc totscore diff grade passed;275NOTE: PROCEDURE CORR used (Total process time):real time 0.16 secondscpu time 0.15 seconds276 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;279280281282 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;295