%newsas(draft); title 'Draft Lottery data: Mean priority by month'; %include data(draftusa); *-- Get medians & spreads; proc univariate noprint data=draftusa; *- Noprint supresses print out; var PRIORITY; by MONTH; output out=SUMRY median=MEDIAN mean=MEAN q1=Q1 q3=Q3; proc print data=SUMRY; id MONTH; Title2 'Summary values by month'; *-- Plot trace lines; proc plot data=SUMRY; plot MEDIAN * MONTH = 'M' MEAN * MONTH = '*' Q1 * MONTH = 'L' Q3 * MONTH = 'H' / overlay; proc glm data=draftusa; /* Any differences in month means? */ class MONTH; model PRIORITY = MONTH; data draftusa; set draftusa; LACKOFIT = MONTH; proc glm; /* What about a linear regression? */ class LACKOFIT; /* & a lack-of-fit test */ model PRIORITY = MONTH LACKOFIT; run;