? ====================================================================== ? ? Quintiles using the SORT procedure. (Note that quartiles are done by ? the MSD (ALL) procedure). ? TSP 4.2B (August 1994) ? Author: Clint Cummins ? PROC QUINTILE X QX; SET N = @NOB; COPY X SX; SORT SX; SET Q1 = 1 + 1*INT((N-1)/5); SET Q2 = 1 + 2*INT((N-1)/5); SET Q3 = 1 + 3*INT((N-1)/5); SET Q4 = 1 + 4*INT((N-1)/5); SET Q5 = 1 + 5*INT((N-1)/5); SMPL Q1,Q1 Q2,Q2 Q3,Q3 Q4,Q4 Q5,Q5 ; MMAKE QX SX; ? ? QX contains a 5-observation series with the quintiles. You will have ? to restore the SMPL on return from QUINTILE (or use FREQSAV) if you ? wish to do anything else with the series. ? ENDPROC QUINTILE ;