1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 /*************************** berkeley.sas *********************************/57 title 'Berkeley Graduate Admissions Data: ';5859 proc format;60 value sexfmt 1 = 'Female' 0 = 'Male';NOTE: Format SEXFMT is already on the library WORK.FORMATS.NOTE: Format SEXFMT has been output.61 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 secondscpu time 0.00 seconds62 data berkley;63 input line sex dept $ admit count;64 format sex sexfmt.; format admit ynfmt.;65 datalines;NOTE: The data set WORK.BERKLEY has 24 observations and 5 variables.NOTE: DATA statement used (Total process time):real time 0.02 secondscpu time 0.02 seconds90 ;91 proc freq;92 tables sex*admit / nopercent nocol chisq;93 tables dept*sex*admit / nopercent nocol chisq;94 tables dept*sex / nopercent nocol chisq;95 tables dept*admit / nopercent nocol chisq;96 weight count;979899 /* 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.50 secondscpu time 0.49 seconds100 proc iml;NOTE: IML Ready101 x = 17.2480 + 0.2537 + 0.7535 + 0.2980 + 1.0011 + 0.3841;102 pval = 1-probchi(x,6);103 print "Pooled chisquare = " x "df=6, p = " pval;104 Bonferroni = 0.05/6;105 print "Reject with Bonferroni correction if p <" Bonferroni;106107108 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;120