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

Re: st: Teach an old dog new tricks

From   "Joseph Coveney" <[email protected]>
To   "Statalist" <[email protected]>
Subject   Re: st: Teach an old dog new tricks
Date   Fri, 9 May 2008 12:03:13 +0900

Sergiy Radyakin wrote:

I am looking for a way to get the matrix of means, which is displayed
but not saved by, e.g.:

sysuse auto
table rep78 head, c(mean price)

The (relatively new) svy commands allow this, but they are quite slow
for the purpose. -table- was in Stata for ages, but it still does not
save any matrix results.

I am aware of an option replace, which saves the means in the dataset,
but it destroys the data, - something I am trying to avoid. Adding
preserve/restore will slow the program down sufficiently enough to
reject this way of doing it.

Is it possible to obtain a matrix of means from table (or another
command with a similar functionality) (preferred) ? Or is it possible
to tell table,replace to keep the existing data and add the computed
statistics as new variables (good)?



If you're interested in means:

sysuse auto
xi: regress price i.rep78*i.headroom, noconstant
matrix list e(b)

Joseph Coveney

*   For searches and help try:

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