[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
An Introduction to Modern Econometrics Using Stata:

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:

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