Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: gsort issue


From   "Maarten Buis" <M.Buis@fsw.vu.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: gsort issue
Date   Thu, 5 Jul 2007 14:08:01 +0200

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

--- Fred Wolfe wrote:
> Is there a problem with gsort (Stata 10 and below) or am I
> misunderstanding something?
> 
> I have a variable called -phdif-. I want the greatest value of that
> variable to appear in the last observation. There are missing values,
> so I use -gsort- with the -mfirst- option.
<snip>
> The problem appears to be that missings are still last even though I
> used the -mfirst- option.

The same issue appears in Stata 9:
. sysuse auto, clear
(1978 Automobile Data)

. gsort rep78, mfirst

. list rep78 in 74

     +-------+
     | rep78 |
     |-------|
 74. |     . |
     +-------+

Maarten

*
*   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