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

st: Re: grading


From   Christopher F Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: grading
Date   Wed, 11 Jun 2003 07:00:28 -0400

On Wednesday, June 11, 2003, at 02:33 AM, Chris wrote:

Thanks. I must still not understand how -pctile- and -xtile- work. This code
gave me sort of a U-shaped distribution of grades: highest-scoring students
got fail, and so did the lowest-scoring. In the middle were honors, high pass,
and pass.


I had the percentiles backward, given that the lowest percentiles will be the lowest grades.


pctile gr = score, nq(20)
xtile pc = score, cut(gr)
g str9 grade="Fail"
replace grade="Honors" if pc>17
replace grade="High Pass" if pc>12 & pc<18
replace grade="Pass" if grade=="Fail" & score>299
The 'gr' variable contains 20 observations, corresponding to the 5th, 10th, 15th,... 95th
percentiles of the distribution. Thus the top 3 categories should be pc=18, 19, 20; the next five should be 13,..17.
The example you posted today contained rules not included in your original postiing (re 199, e.g.)

Kit

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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