Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Understanding the difference between gen and egen


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Understanding the difference between gen and egen
Date   Wed, 14 Jun 2006 14:38:02 +0100

To the extent that that is true, many Stata users 
want to push it at new users, which is where the
thread started....

Nick 
[email protected] 

Richard Williams
 
> At 03:14 AM 6/14/2006, Nick Cox wrote:
> >I am not knocking -egen-. I may be its greatest
> >fan in the Stata community. I have found it helpful
> >in my own work to be able to use, and to write -egen-
> >functions. But it is not, itself, an enormous deal. It is at root
> >a rag-bag of convenient short-cuts. For example,
> >if -egen, total()- did not exist, we could get
> >there typically in two lines instead of one,
> >as in
> >
> >bysort bar: egen foototal = total(foo)
> >
> >being done by
> >
> >bysort bar : gen foototal = sum(foo)
> >by bar: replace foototal = foototal[_N]
> 
> I think that may understate egen's value a bit.  True, as far as 
> typing goes, it may sometimes only save you a line or two.  But for 
> many people it will also save the several hours it would take to 
> figure out what those two or three lines would be!

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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