Statalist


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

st: Re: saving memory local vs usual variable


From   Christopher Baum <[email protected]>
To   [email protected]
Subject   st: Re: saving memory local vs usual variable
Date   Tue, 7 Oct 2008 14:47:11 -0400

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



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