|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: -mean- over id, save to a new dta, then variance matrix
From |
"Austin Nichols" <[email protected]> |
To |
[email protected] |
Subject |
Re: st: -mean- over id, save to a new dta, then variance matrix |
Date |
Thu, 18 Oct 2007 10:16:02 -0400 |
The first part is
collapse v2-v17, by(v1)
but I don't understand what you mean by "I would like to calculate the
variance matrix for such new dta and saving it in one more new dta."
On 10/18/07, [email protected] <[email protected]> wrote:
> I have one dta of 17 columns and 354 rows. The first column, named id, contains the panel identifier (an integer from 1 to 63). I would like to produce a new dta file with 17 columns (keeping the original names) and 63 rows, containing the id variable, and the mean of the remaining 16 columns calculated by the id variable.
> I know that I can have such means by -mean- and -tabstat-, but how can easily export the results in a new dataset? Next, I would like to calculate the variance matrix for such new dta and saving it in one more new dta.
> How can I do?
*
* 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/