Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: a question related to -foreach-


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: a question related to -foreach-
Date   Tue, 21 Oct 2008 19:19:26 +0200

Carlo might also like -h collapse-

HTH
Martin
----- Original Message ----- From: "Carlo Lazzaro" <carlo.lazzaro@tiscalinet.it>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, October 21, 2008 4:38 PM
Subject: st: a question related to -foreach-


Dear Statalisters,
following the below reported:

. foreach x of varlist  b1-b36 {
 2. summarize `x'
 3. }

I would like to generate a newvar in which the r(mean) for each one of the
36 variables included in varlist are stored. How can I do this in Stata
9.2/SE?

Thanks a lot for your kindness and for your time.

Kind Rgards,

Carlo


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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