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

st: a question related to -foreach-

From   "Carlo Lazzaro" <>
To   <>
Subject   st: a question related to -foreach-
Date   Tue, 21 Oct 2008 16:38:46 +0200

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

Thanks a lot for your kindness and for your time.

Kind Rgards,


*   For searches and help try:

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