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, is already up and running.

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

st: by prefix

From   tashi lama <>
To   <>
Subject   st: by prefix
Date   Mon, 4 Jun 2012 14:35:00 +0000


  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?





*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index