Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: dropping the lowest three observations
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: dropping the lowest three observations
Date
Thu, 14 Feb 2013 18:56:44 +0000
See
SJ-9-1 pr0046 . . . . . . . . . . . . . . . . . . . Speaking Stata: Rowwise
(help rowsort, rowranks if installed) . . . . . . . . . . . N. J. Cox
Q1/09 SJ 9(1):137--157
shows how to exploit functions, egen functions, and Mata
for working rowwise; rowsort and rowranks are introduced
It sounds like -rowsort- followed by -egen, rowmean()-.
http://www.stata-journal.com/sjpdf.html?articlenum=pr0046
Alternatively, -reshape- and apply -by:-.
Nick
On Thu, Feb 14, 2013 at 6:38 PM, John Levendis
<[email protected]> wrote:
> I'm doing my grading on Stata, and I'd like to drop each student's
> lowest three grades. Each row is a student, and for each student I have
> their quiz grades as Q1, Q2, Q3, and so on. How can I compute their
> average grades while dropping their lowest three Qs? Incidentally, these
> quiz grades are out of 10 pts, so it is quite common for students to
> have multiple quizzes with the same scores. (Some kind of nested rmin()
> function, I'm sure, but I can't figure it out.)
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/