Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: egen total is not equal to total


From   Haluk Vahaboglu <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: egen total is not equal to total
Date   Sat, 16 Nov 2013 04:47:52 +0000

P { margin-bottom: 0.21cm; }


	
	
	
	P { margin-bottom: 0.21cm; }


Dear Stata listers,
I am using Stata 12.1 64
for linux. 

I want to drop duplicates
of (x y z) variables after getting the total of variable M.
Below, you may see what I
do.
My problem is that totals
before and after are not equal. Is this because I make something
wrong?
Any help would be greatly
appreciated. 







.bysort x y z: egen
TOTAL=total(M)
.bysort x y z: replace
TOTAL=.  if _n!=[1]
.total M TOTAL





Total estimation          
         Number of obs    =   18825



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

           |      Total  
Std. Err.     [95% Conf. Interval]

---------------+------------------------------------------------

       M |   79710.59  
16778.85      46822.54    112598.6

TOTAL|   84234.31  
16779.48      51345.02    117123.6

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




79710.59 !=  84234.31





Prof. Dr. Haluk Vahaboğlu 		 	   		  

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index