Statalist


[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" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
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, nicola.baldini2@unibo.it <nicola.baldini2@unibo.it> 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/



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