2008/10/3 Ashim Kapoor <[email protected]>:
>
> And I am still puzzled as to why someone would not allow us to set
> local j=max(list)
> cos that seems intuitive.
If the list includes variable names, how is Stata supposed to know
which observation's maximum you mean? -egen- is meant to work with
variables. -egen- functions are not available outside -egen.
On the other hand, there are Stata functions (-help functions-) which
will work in general expressions. Therefore,
local j = max(4, 92, -35, 399, 0)
will correctly store 399 in local macro j.
Eva
*
* 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/