Statalist The Stata Listserver


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

st: -mean- vs -regress-


From   "Stas Kolenikov" <[email protected]>
To   [email protected]
Subject   st: -mean- vs -regress-
Date   Wed, 30 May 2007 11:27:43 -0500

just a comment: I am running some simulations, and I see vividly in
the processor time spent that -regress- (with a single predictor) is
about five times faster than -mean-. One would think that estimating
the mean is simpler than estimating regression... at least that's what
we teach undergrads in our intro stat classes :)). It probably means
that Stata Corp. has perfected the matrix operations behind -regress-
while -mean- has received about 100 times less attention. So if you
need a sample mean (with a CI / variance estimate) of a single
variable, without the bells and whistles like -over-, you are better
off running -reg y- rather than -mean y-.

--
Stas Kolenikov
http://stas.kolenikov.name
*
*   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