[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: -mean- vs -regress-
Exactly. It's an uneven contest from the outset.
> Well think of -regress- as a single line of Mata code -- even though
> compiled, whatever you do with the means and variances, you would have
> to have a few lines of code, which would translate into a bigger obj
> file, etc.
> On 5/30/07, Nick Cox <firstname.lastname@example.org> wrote:
> > -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.
> > Nick
> > email@example.com
> > 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
> > > 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: