Statalist


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

st: total


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: total
Date   Mon, 26 Jan 2009 15:19:42 +0100

Dear Statalisters,

just a quick question: When I

sysuse auto, clear
total mpg

the result is 1,576. An additional element in the -varlist- for -total-
changes the whole bargain:

total mpg rep78

results in 1,469 as the total for mpg. Why would I want this behavior?
Obviously, I can replicate the 1,469 with 

qui egen float tot = total(mpg) if !missing(rep)
l tot in l

But if all I wanted was a matrix of totals for my vars, why would a missing
value in one of them invalidate the total for the others? Is there an easy
explanation that I am overlooking?


Best
Martin




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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