Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: by prefix


From   tashi lama <ltashi32@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: by prefix
Date   Mon, 4 Jun 2012 14:35:00 +0000

Hello,

  Here is sth I found Stata very unintelligent. A by prefix has to be preceded by sort command although the dataset is already sorted by design. Take a look at this

 

var1    var2

A         3

A         4 

A         1

B         2

B         5

 

 

The dataset is already sorted by var1 as you all can see. Now when I apply by prefix

by var1: summ var2    says not sorted. 

Stata obliges you to write 

bysort var1: summ var2    which I think is overkill. Any thoughts?

 

Thanks,

Tashi

 

  		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index