Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Loop question II


From   Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Loop question II
Date   Wed, 9 Feb 2011 00:00:51 -0800

You have repeated "All_Factors_3R_SES" on the last line. Plus, if
these are all variables, as your usage suggests, use "varlist" rather
than "local" as you -listtype-.

T

On Tue, Feb 8, 2011 at 11:43 PM, Alberto R Osella
<arosella@irccsdebellis.it> wrote:
> Dear Stata listers,
> I'm trying to run this loop:
> foreach lr of local  F1_5R_SES F1_5R_EST F2_5R_SES F2_5R_EST F3_5R_SES
> F3_5R_EST F4_5R_SES F4_5R_EST F1_5B_SES F1_5B_EST F2_5B_SES F2_5B_EST
> F3_5B_SES F3_5B_EST ///
>                                F4_5B_SES F4_5B_EST F1_4R_SES F1_4R_EST
> F2_4R_SES F2_4R_EST F3_4R_SES F3_4R_EST F4_4R_SES F4_4R_EST F1_4B_SES
> F1_4B_EST F2_4B_SES F2_4B_EST  ///
>                                F3_4B_SES F3_4B_EST F4_4B_SES F4_4B_EST
> F1_3R_SES F1_3R_EST F2_3R_SES F2_3R_EST F3_3R_SES F3_3R_EST F4_3R_SES
> F4_3R_EST F1_3B_SES F1_3B_EST  ///
>                                F2_3B_SES F2_3B_EST F3_3B_SES F3_3B_EST
> F4_3B_SES F4_3B_EST All_Factors_5R_SES All_Factors_5R_EST All_Factors_5B_SES
> All_Factors_5B_EST                     ///
>                               All_Factors_4R_SES All_Factors_4R_EST
> All_Factors_4B_SES All_Factors_4B_EST All_Factors_3R_SES All_Factors_3R_EST
> All_Factors_3R_SES All_Factors_3B_EST   {
>                     logistic caso_ctrol0 `lr'
>                     }
> where any of the name of local are local previously defined.
> Stata tells me:
>  3.                                          }
> { required
> r(100);
>
> end of do-file
> I'm using Stata11.1 on Windows 7.
> Can anyone help me?
> Thank you
>
> --
> Alberto R. Osella, MD, PhD
> Laboratorio di Epidemiologia e Biostatistica
> IRCCS Saverio de Bellis
> Via Turi, 27
> 70013 Castellana Grotte (BA)
> Italia
> Tel:    +39 0804994655
> Fax:    +39 0804994650
> e-mail: arosella@irccsdebellis.it
>
> *
> *   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/
>



-- 
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index