Example 2.9. Listing the Rank and Percentile for Each Observation

Goal

Rank the observations in a data set based on the value of a numeric variable. Determine the quartile based on the value of a numeric variable. List the observations and their ranks and quartiles.

Report

                     Official Results of Boston
 Marathon 1980-2004                                  1
                 With Winning Times Ranked from
 Fastest(1) to Slowest(N)

                                     Women's Division

          Year  Winner                  Country   
 Time Order Quartile 1980 Jacqueline ...

Get SAS® Guide to Report Writing: Examples, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.