Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: foreach syntax


From   "Paul Fenner" <paulfenner@hotmail.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: foreach syntax
Date   Wed, 21 Feb 2007 11:30:47 +0000

:01C755AB]
Sender: owner-statalist@hsphsun2.harvard.edu
Precedence: bulk
Reply-To: statalist@hsphsun2.harvard.edu
Errors-To: statalist-owner@hsphsun2.harvard.edu
The following works in Stata9:
local x =3D"lr1-ul6"
foreach i of local x{
su `i'
}

but
local x =3D"lr1-ul6"
foreach i of local x{
ttest `i',by(gender)
}

with error r(103) too many variables specified.
Could somebody please tell me what I am doing wrong.
Thank you,
Paul

_________________________________________________________________
MSN Hotmail is evolving =96 check out the new Windows Live Mail
http://ideas.live.com

*
*   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