< >
Wrong again.
sysuse auto
egen hip = max(price), by(rep78)
returns six distinct values of hip.
It would make no sense for this to work when egen returns a single
number but break when egen returns several distinct values, as it
often does.
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
On Oct 4, 2008, at 2:33 AM, Ashim wrote:
egen j=max(x) DOES NOT take more than one variable.
It is gen which can do the max of 2 or more variables.
So since egen returns a variable with ONE constant value, it would
seem that it should be allowed to be stored in a scalar / local macro.
*
* 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/