Statalist The Stata Listserver

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

st: RE: -mean- vs -regress-

From   "Nick Cox" <>
To   <>
Subject   st: RE: -mean- vs -regress-
Date   Wed, 30 May 2007 17:41:46 +0100

-mean.ado- is a front end for -_svy_summarize.ado- whether you 
have -svy- stuff or not. The latter poses an overhead 
of interpretation that is more substantial than 
that imposed by -regress.ado-, which is a front end for the 
built-in -_regress-. I didn't inspect -_svy_summarize- closely, 
but I suspect that is most of the answer. 

Stas does not mention any comparison with any minimal mean 
program that would use Mata to get a view on a variable 
and then calculate the mean. My own experiments show that
I can't beat -regress- for this problem. 


Stas Kolenikov

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

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index