Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: percentiles

From   "Christopher W. Ryan" <>
To   <>
Subject   st: percentiles
Date   Tue, 10 Jun 2003 01:36:25 -0400

I have an MS Access database in which I keep track of students' performance on 
various exercises.  Now that it is the end of the year, I need to calculate 
final letter grades.  I thought maybe Stata could help.

I StatTransfer'ed the necessary query to Stata format.  Then I -collapsed- it 
into a new dataset containing the sum of the scores on the various excercises, 
by student.  Then I -gsorted- the sum, in descending order.

Top 15% get honors; next 25% get high pass, everyone else above 299 gets pass.  
Everyone else fails.  [Now is not the time to debate "relative" grading--I 
don't like it either, but the powers-that-be at my university tell me to do it 
that way.]

I could just -list- the sorted dataset and eyeball it to assign final letter 
grades, but I'm lazy.  Can Stata do this for me?  I've been looking at -egen-, 
and -pctile-.  They look promising, but I can't figure out how to use them for 
this purpose.  Or is there another, better, command?

Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
and Wilson Family Practice Residency
40 Arch Street, Johnson City, NY  13790
Public key generated with PGP 602i available at
or via

"If you want to build a ship, don't drum up the men to gather wood, divide the 
work and give orders. Instead, teach them to yearn for the vast and endless 
sea."  [Antoine de St. Exupery]

*   For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index