1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 /* describemath0.sas */74 title 'Gender, Ethnicity and Math performance';75 title2 'Basic descriptive statistics on the combined sample';7677 proc format;78 value ynfmt 0 = 'No' 1 = 'Yes';NOTE: Format YNFMT is already on the library WORK.FORMATS.NOTE: Format YNFMT has been output.79 value crsfmt 4 = 'No Resp';NOTE: Format CRSFMT is already on the library WORK.FORMATS.NOTE: Format CRSFMT has been output.80 value nfmt81 1 = 'Chinese'82 2 = 'Japanese'83 3 = 'Korean'84 4 = 'Vietnamese'85 5 = 'Other Asian'86 6 = 'Eastern European'87 7 = 'Hispanic'88 8 = 'English-speaking'89 9 = 'French'90 10 = 'Italian'91 11 = 'Greek'92 12 = 'Germanic'93 13 = 'Other European'94 14 = 'Middle-Eastern'95 15 = 'Pakistani'96 16 = 'East Indian'97 17 = 'Sub-Saharan'98 18 = 'OTHER or DK';NOTE: Format NFMT is already on the library WORK.FORMATS.NOTE: Format NFMT has been output.99100 value ncfmt101 1 = 'Asian'102 2 = 'Eastern European'103 3 = 'European not Eastern'104 4 = 'Middle-Eastern and Pakistani'105 5 = 'East Indian'106 6 = 'Other and DK' ;NOTE: Format NCFMT is already on the library WORK.FORMATS.NOTE: Format NCFMT has been output.107NOTE: PROCEDURE FORMAT used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 248.37kOS Memory 27044.00kTimestamp 02/13/2024 06:18:54 PMStep Count 34 Switch Count 0Page Faults 0Page Reclaims 27Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 32108 data math;109 infile '/home/u1407221/441s24/data/math.data.txt';110 input id course precalc calc gpa calculus english mark lang $ sex $111 nation1 nation2 sample;112113 /* Computed Variables: totscore, passed, grade, hsgpa, hscalc, hsengl,114 tongue, class, ethnic */115116 totscore = precalc+calc;117 if (50<=mark<=100) then passed=1; else passed=0;118 /* Some missing final marks were zero, and 998=SDF and 999=WDR */119 if mark=0 then grade=.;120 else if mark > 100 then grade=.;121 else grade=mark;122 /* Missing HS marks were zeros */123 if 65 le gpa le 100 then hsgpa = gpa; /* Else missing is automatic */124 if 1 le calculus le 100 then hscalc = calculus;125 if 1 le english le 100 then hsengl = english;126 /* There were just a few French speakers */127 if lang='French' then tongue='Other '; else tongue=lang;128 label tongue = 'Mother Tongue (Eng or Other)';129 class = course;130 if class = 4 then class = .;131132133 /********* Nationality According to the 2 raters **********/134 if 1 <= nation1 <= 5 then rater1 = 1;135 else if nation1 = 6 then rater1 = 2;136 else if 7 <= nation1 <= 13 then rater1 = 3;137 else if 14 <= nation1 <= 15 then rater1 = 4;138 else if nation1 = 16 then rater1 = 5;139 else rater1 = 6;140 if 1 <= nation2 <= 5 then rater2 = 1;141 else if nation2 = 6 then rater2 = 2;142 else if 7 <= nation2 <= 13 then rater2 = 3;143 else if 14 <= nation2 <= 15 then rater2 = 4;144 else if nation2 = 16 then rater2 = 5;145 else rater2 = 6;146 /* Rater 1 knows Middle Eastern names -- otherwise believe Rater 2 */147 if rater1=4 then ethnic=rater1; else ethnic=rater2;148 /********************************************************************/149150 label151 precalc = 'Number precalculus correct'152 calc = 'Number calculus correct'153 totscore = 'Total # right on diagnostic test'154 passed = 'Passed the course'155 grade = 'Final mark'156 hsgpa = 'High School GPA'157 hscalc = 'HS Calculus'158 hsengl = 'HS English'159 lang = 'Mother Tongue'160 rater1 = 'Nationality of name acc to rater1'161 rater2 = 'Nationality of name acc to rater2'162 tongue = 'Mother Tongue (Eng or Other)'163 ethnic = 'Judged Nationality of name' ;164165 format course crsfmt.;166 format passed ynfmt.;167 format nation1 nation2 nfmt.;168 format rater1 rater2 ethnic ncfmt.;169170 /*********************************************************************/171172 /* Check created variables */173174 /* Do this for transformed quantitative variables - Lots of output175 proc print data=math;176 var mark grade;177 */178179 /* Check created variables180 proc freq data=math;181 tables lang*tongue / norow nocol nopercent missing;182 tables course*class / norow nocol nopercent missing;183 tables nation1*rater1 / norow nocol nopercent missing;184 tables nation2*rater2 / norow nocol nopercent missing;185 tables (rater1 rater2) * ethnic / norow nocol nopercent missing;186 */187188 /* Could use "by" , like this to get separate results for each sample.189 proc sort data=math;190 by sample;191 proc means data=math;192 title3 'Quantitative Variables';193 by sample;194 var precalc calc totscore hsgpa hscalc hsengl grade;195 */196NOTE: The infile '/home/u1407221/441s24/data/math.data.txt' is:Filename=/home/u1407221/441s24/data/math.data.txt,Owner Name=u1407221,Group Name=oda,Access Permission=-rw-r--r--,Last Modified=10Feb2024:16:04:10,File Size (bytes)=90324NOTE: 1158 records were read from the infile '/home/u1407221/441s24/data/math.data.txt'.The minimum record length was 76.The maximum record length was 76.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).180 at 116:24NOTE: The data set WORK.MATH has 1158 observations and 24 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondsuser cpu time 0.01 secondssystem cpu time 0.00 secondsmemory 968.14kOS Memory 27816.00kTimestamp 02/13/2024 06:18:54 PMStep Count 35 Switch Count 2Page Faults 0Page Reclaims 152Page Swaps 0Voluntary Context Switches 16Involuntary Context Switches 0Block Input Operations 0Block Output Operations 536197 proc means data=math;198 title3 'Quantitative Variables';199 class sample;200 var precalc calc totscore hsgpa hscalc hsengl grade;201NOTE: There were 1158 observations read from the data set WORK.MATH.NOTE: PROCEDURE MEANS used (Total process time):real time 0.06 secondsuser cpu time 0.06 secondssystem cpu time 0.01 secondsmemory 9823.56kOS Memory 35772.00kTimestamp 02/13/2024 06:18:55 PMStep Count 36 Switch Count 2Page Faults 0Page Reclaims 1982Page Swaps 0Voluntary Context Switches 18Involuntary Context Switches 0Block Input Operations 0Block Output Operations 8202 proc freq data=math;203 title3 'Categorical variables';204 tables sample * (course sex ethnic tongue passed) / norow nocol nopercent missing;205206 run;NOTE: There were 1158 observations read from the data set WORK.MATH.NOTE: PROCEDURE FREQ used (Total process time):real time 0.07 secondsuser cpu time 0.07 secondssystem cpu time 0.00 secondsmemory 1817.29kOS Memory 31408.00kTimestamp 02/13/2024 06:18:55 PMStep Count 37 Switch Count 5Page Faults 0Page Reclaims 285Page Swaps 0Voluntary Context Switches 33Involuntary Context Switches 0Block Input Operations 0Block Output Operations 568206 ! quit;207208 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;220