Statalist The Stata Listserver


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

st: re:total vs sum


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re:total vs sum
Date   Sun, 24 Jun 2007 20:06:48 -0400

Sebastian said:

Hi everybody. I'm just beggining in Stata.

Can I have the same result if use "egen peso=sum(pesoan)" or "egen
peso=total(pesoan)"

Why "gen peso=sum(pesoan)"  has a different result?


They are the same:

*! version 4.0.0  04oct2004
program define _gsum
        // -egen- function -sum()- renamed to -total()- for Stata 9

        // no -version #- statement
        _gtotal `0'
end

To see this,

which _gsum
viewsource _gsum.ado


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


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