Statalist


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

st: AW: re: total


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

Line for the server


Kit, 

thanks for this. Your solution amounts to running -total- for each var and
gathering the results in a -matrix-. But what is your take on the underlying
question whether a) the default behavior of -total- should be what it is and
b) whether there should be a tick box in -db total- which lets me opt out of
the current default behavior?



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Kit Baum
Gesendet: Montag, 26. Januar 2009 15:36
An: [email protected]
Betreff: st: re: total

<>
Martin complains that -total- (like -mean-, presumably) performs  
listwise deletion (unlike, say, -summarize-). To get around this:

--------------
clear all
sysuse auto
local mw price mpg rep78
foreach v of local mw {
	qui total `v'
	mat b = nullmat(b),e(b)
	mat en = nullmat(en), e(_N)
}
mat list b
mat list en
--------------


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/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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