Statalist The Stata Listserver


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

Re: st: Re: egen total()


From   Teresa Dale Nelson <[email protected]>
To   [email protected]
Subject   Re: st: Re: egen total()
Date   Tue, 7 Nov 2006 18:34:55 -0600 (CST)

Right - I often try to use the varlist when I should be using the 
expression.
Thanks for pointing this out to me.
Terri



Kit Baum wrote:


>No, because egen total does not accept a varlist. It accepts an exp,  
>as does generate. This is the source of your problem.
>
>         total(exp)                                           (allows  
>by varlist:)
>             creates a constant (within varlist) containing the sum  
>of exp.  Also
>             see mean().
>
>Kit Baum, Boston College Economics
>http://ideas.repec.org/e/pba1.html
>An Introduction to Modern Econometrics Using Stata:
>http://www.stata-press.com/books/imeus.html
>
>
>On Nov 5, 2006, at 2:33 AM, Teresa wrote:
>
>> As it turns out, egen [var] = rowsum([varlist]) is equivalent to
>> egen [var] = total([varlist]).
>
>*
>*   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/
>
*
*   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