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

RE: st: -rowsort- updated on SSC

From   "ALICE DOBSON" <>
Subject   RE: st: -rowsort- updated on SSC
Date   Wed, 23 Nov 2005 06:27:14 -0500

Thanks a lot Nick and Kit.

From: "Nick Cox" <>
To: <>
Subject: st: -rowsort- updated on SSC
Date: Wed, 23 Nov 2005 00:31:01 -0000

Thanks to Kit Baum, a revised version of -rowsort-
is now available from SSC.

Recently Alice Dobson posted a problem for which
I recommended -rowsort- from SSC. Alice also
pointed out that in a problem such as hers in
which missing values are present -rowsort- does
not operate as desired.

Suppose in a one observation (row) of a set of
variables the values are 1 . 3 . 5 . 7.

-rowsort- by default follows standard Stata
rules and orders these 1 3 5 7 . . . and with
a -descend- option it orders them . . . 7 5 3 1.

The latter then makes it difficult to read off
largest, second largest, and so forth, as might
often be wished.

An easy work-around is to hit the variables
concerned with -mvencode- and then adjust for what
you did.

However, as earlier indicated, I have now added
an option that specifies that missings should be
treated as some specified number when sorting is
being done. Normally, but not necessarily, the
user would specify a large negative integer lower
than the minimum in the data. It would be possible
to do this automatically, but giving the user
this handle adds some further control.

-rowsort- has been revised at the same time and
now requires Stata 8. (In some future revision
using Mata for the sorting is to be considered.)
The previous -rowsort- has now been renamed -rowsort6-
and will work with Stata 6 or 7, but it has not
otherwise been changed (i.e. it does not have this
new option).

Thanks to Alice for her interesting problem.


*   For searches and help try:
Donít just search. Find. Check out the new MSN Search!

* For searches and help try:

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