|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: &Agr;&Pgr;: -mean- over id, save to a new dta, then variance matrix
Why don't you check the "statsby" command? I think it may do what you want.
best,
Dimitris
________________________________________
&Agr;&pgr;&oacgr;: [email protected] [[email protected]] &Egr;&kgr; &mgr;&eacgr;&rgr;&ogr;&ugr;&sfgr; &tgr;&ogr;&ugr; [email protected] [[email protected]]
&Agr;&pgr;&ogr;&sgr;&tgr;&ogr;&lgr;&eeacgr;: &Pgr;&eacgr;&mgr;&pgr;&tgr;&eegr;, 18 &Ogr;&kgr;&tgr;&ohgr;&bgr;&rgr;&iacgr;&ogr;&ugr; 2007 12:54 &mgr;&mgr;
&Pgr;&rgr;&ogr;&sfgr;: [email protected]
&THgr;&eacgr;&mgr;&agr;: st: -mean- over id, save to a new dta, then variance matrix
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?
Nicola
*
* 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/
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept
**********************************************************************
*
* 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/