1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 /* describemath.sas */
57 title 'Gender, Ethnicity and Math performance';
58 title2 'Basic descriptive statistics on the exploratory sample';
59
60 proc format;
61 value ynfmt 0 = 'No' 1 = 'Yes';
NOTE: Format YNFMT has been output.
62 value crsfmt 4 = 'No Resp';
NOTE: Format CRSFMT has been output.
63 value nfmt
64 1 = 'Asian'
65 2 = 'Eastern European'
66 3 = 'European not Eastern'
67 4 = 'Middle-Eastern and Pakistani'
68 5 = 'East Indian'
69 6 = 'Other and DK' ;
NOTE: Format NFMT has been output.
70
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
71 data math;
72 infile '/folders/myfolders/exploremath.data.txt';
73 input id course precalc calc gpa calculus english mark lang $ sex $
74 nation1 nation2 sample;
75
76 /* Computed Variables: totscore, passed, grade, hsgpa, hscalc, hsengl,
77 tongue, ethnic */
78
79 totscore = precalc+calc;
80 if (50<=mark<=100) then passed=1; else passed=0;
81 /* Some missing final marks were zero, and 998=SDF and 999=WDR */
82 if mark=0 then grade=.;
83 else if mark > 100 then grade=.;
84 else grade=mark;
85 /* Missing HS marks were zeros */
86 if 65 le gpa le 100 then hsgpa = gpa; /* Else missing is automatic */
87 if 0 < calculus < 101 then hscalc = calculus;
88 if 0 < english < 101 then hsengl = english;
89 /* There were just a few French speakers */
90 if lang='French' then tongue='Other '; else tongue=lang;
91 label tongue = 'Mother Tongue (Eng or Other)';
92 /* Rater 1 knows Middle Eastern names -- otherwise believe Rater 2 */
93 if nation1=4 then ethnic=nation1; else ethnic=nation2;
94
95 /********************************************************************/
96
97 label
98 precalc = 'Number precalculus correct'
99 calc = 'Number calculus correct'
100 totscore = 'Total # right on diagnostic test'
101 passed = 'Passed the course'
102 grade = 'Final mark'
103 hsgpa = 'High School GPA'
104 hscalc = 'HS Calculus'
105 hsengl = 'HS English'
106 lang = 'Mother Tongue'
107 nation1 = 'Nationality of name acc to rater1'
108 nation2 = 'Nationality of name acc to rater2'
109 tongue = 'Mother Tongue (Eng or Other)'
110 ethnic = 'Judged Nationality of name' ;
111
112 format course crsfmt.;
113 format passed ynfmt.;
114 format nation1 nation2 ethnic nfmt.;
115
116 /*********************************************************************/
117
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 79:24
NOTE: The data set WORK.MATH has 579 observations and 21 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
118 proc means;
119 title3 'Quantitative Variables';
120 var precalc calc totscore hsgpa hscalc hsengl grade;
121
NOTE: There were 579 observations read from the data set WORK.MATH.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
122 proc freq;
123 title3 'Categorical variables';
124 tables course sex ethnic tongue passed;
125
126 /* Bar chart of ethnic would be nice. */
127
NOTE: There were 579 observations read from the data set WORK.MATH.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
128 proc univariate normal plot;
129 /* The normal option gives tests of H0: Data are normal.
130 Plot produces graphics, some of which are informative. */
131 title3 'Detailed look at grade';
132 var grade;
133
NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 3.23 seconds
cpu time 0.24 seconds
134 proc freq;
135 title3 'Frequency Distribution of Final Grade';
136 tables grade;
137
138 /* The following suggests that profs in Courses 1 and 3 bumped
139 the marks discontinuously, while the prof in Course 2 did
140 something more sophisticated. */
141
NOTE: There were 579 observations read from the data set WORK.MATH.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.11 seconds
cpu time 0.11 seconds
142 proc freq;
143 title3 'Grade separately by course';
144 where course < 4; /* Exclude no response */
145 tables grade*course / norow nopercent nopercent;
146
147
148
149 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
161