/************************ math0.2.sas *************************/ title 'Prediction of Performance in First-year Calculus'; title2 'Read exploratory data and locate problems: Part 2'; proc format; value ynfmt 0 = 'No' 1 = 'Yes'; value crsfmt 1 = 'Catch-up' 2 = 'Mainstrm' 3 = 'Elite' 4 = 'No Resp'; value nfmt 1 = 'Asian' 2 = 'Eastern European' 3 = 'European not Eastern' 4 = 'Middle-Eastern and Pakistani' 5 = 'East Indian' 6 = 'Other and DK' ; data mathex; infile '/folders/myfolders/441s18/Lecture/exploremath.data.txt'; input id course precalc calc gpa calculus english mark lang $ sex $ nation1 nation2 sample; /****** Fix problems located in first run ******/ if course = 4 then course = .; /* No response is missing */ /* Missing HS marks were zeros */ if 60 le gpa le 100 then hsgpa = gpa; /* Else missing is automatic */ if 0 < calculus < 101 then hscalc = calculus; if 0 < english < 101 then hsengl = english; /* Some missing university calculus marks were zero, and 998=SDF and 999=WDR */ if mark=0 then grade=.; else if mark > 100 then grade=.; else grade=mark; /* There were just a few French speakers */ if lang='French' then tongue='Other '; else tongue=lang; label tongue = 'Mother Tongue (Eng or Other)'; format course crsfmt.; format nation1 nation2 nfmt.; label precalc = 'Number precalculus correct' calc = 'Number calculus correct' totscore = 'Total # right on diagnostic test' passed = 'Passed the course' grade = 'Final mark (if any)' hsgpa = 'High School GPA' hscalc = 'HS Calculus' hsengl = 'HS English' lang = 'Mother Tongue' nation1 = 'Nationality of name acc to rater1' nation2 = 'Nationality of name acc to rater2' tongue = 'Mother Tongue (Eng or Other)'; proc freq data=mathex; title3 'Frequency distributions of variables to be used'; tables course sex nation1 nation2 hsgpa -- tongue; /* hsgpa -- tongue = hsgpa hscalc hsengl grade tongue */ proc freq data=mathex; title3 'Agreement of raters on nationality of name'; tables nation1*nation2 / norow nocol nopercent;