Christopher W. Ryan
> 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 tried this (adding in a "conditional" grade which I
> forgot to mention) :
>
> use "C:\quarantine\studentprogress.dta"
> collapse (sum) pointsearned, by(studentid)
> gsort -pointsearned
> list
> gen str10 finalgrade="pass"
> replace finalgrade="honors" if _n<=(.15*_N)
> replace finalgrade="high pass" if _n>(.15*_N) & _n<=(.25*_N)
> replace finalgrade="conditional" if pointsearned<300 &
> pointsearned>199
> replace finalgrade="fail" if pointsearned<200
> list
>
> Clumsier, but it seemed to work.
Dangerous code.
This could give students different final grades
even though they got the same points earned,
because you could be splitting ties quite
arbitrarily!
Nick
[email protected]
*
* 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/