Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: collapse (sum) versus egen (sum)


From   [email protected]
To   [email protected]
Subject   st: collapse (sum) versus egen (sum)
Date   Thu, 19 Aug 2004 09:38:42 +0200

While aggregating a dataset using collapse some strange results were
obtained: 

collapse (sum) aantal, by(opl114)

Did not give the same results as the same dataset gave in other programs. 

Checking with 

egen oplantal=sum(aantal),by(opl114)

though gave exactly the same (correct) number that other programs gave me.
Can somebody explain to me how the summation (could) differ between collapse
and egen? 

Thanks. 
--------------------------------------------

Ben Kriechel

Research Centre for Education
and the Labour Market
<[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