1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 /*************************** berkeley.sas *********************************/
72 title 'Berkeley Graduate Admissions Data: ';
73
74 proc format;
75 value sexfmt 1 = 'Female' 0 = 'Male';
NOTE: Format SEXFMT is already on the library WORK.FORMATS.
NOTE: Format SEXFMT has been output.
76 value ynfmt 1 = 'Yes' 0 = 'No';
NOTE: Format YNFMT is already on the library WORK.FORMATS.
NOTE: Format YNFMT has been output.
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 244.37k
OS Memory 29092.00k
Timestamp 01/05/2020 08:27:57 PM
Step Count 33 Switch Count 0
Page Faults 0
Page Reclaims 29
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 32
77 data berkley;
78 input line sex dept $ admit count;
79 format sex sexfmt.; format admit ynfmt.;
80 datalines;
NOTE: The data set WORK.BERKLEY has 24 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 672.09k
OS Memory 29608.00k
Timestamp 01/05/2020 08:27:57 PM
Step Count 34 Switch Count 2
Page Faults 0
Page Reclaims 152
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
105 ;
106 proc freq;
107 tables sex*admit / nopercent nocol chisq;
108 tables dept*sex*admit / nopercent nocol chisq;
109 tables dept*sex / nopercent nocol chisq;
110 tables dept*admit / nopercent nocol chisq;
111 weight count;
112
113
114 /* Get p-value */
NOTE: There were 24 observations read from the data set WORK.BERKLEY.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.32 seconds
user cpu time 0.32 seconds
system cpu time 0.00 seconds
memory 3793.37k
OS Memory 31408.00k
Timestamp 01/05/2020 08:27:57 PM
Step Count 35 Switch Count 4
Page Faults 0
Page Reclaims 436
Page Swaps 0
Voluntary Context Switches 19
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 672
115 proc iml;
NOTE: IML Ready
116 x = 17.2480 + 0.2537 + 0.7535 + 0.2980 + 1.0011 + 0.3841;
117 pval = 1-probchi(x,6);
118 print "Pooled chisquare = " x "df=6, p = " pval;
119 Bonferroni = 0.05/6;
120 print "Reject with Bonferroni correction if p <" Bonferroni;
121
122
123 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
134