Statalist The Stata Listserver


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

Re: st: total vs sum


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: total vs sum
Date   Mon, 25 Jun 2007 09:17:20 +0200

Sebastian wrote:

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?

--------------------------------------------------

Kit Baum and Maarten Buis explained things, but Sebastian
may still be confused. The history is:

Prior to Stata 9 there were
   gen peso = sum(pesoan)
and
   egen peso = sum(pesoan)

Because it was confusing to some (at least to me) to have
different functions with similar names, StataCorp decided
to change name of the -egen- -sum()- function to:
   egen peso = total(pesoan)
but
   egen peso = sum(pesoan)
should continue working as usual - and it does.

Some other -egen- functions changed name as well. The changes
are described in:
   help whatsnew8to9

Hope this helps
Svend

__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [email protected]
__________________________________________ 

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