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]
st: loop issue
From
"Dherani, Mukesh" <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: loop issue
Date
Wed, 10 Jul 2013 09:01:35 +0000
Dear all,
I have a very basic problem in creating a loop.
In my data I want to run successive logistic regression models after dropping a few variables. I have developed following code:
local all var1 var2 var3 ..................... var 10 // include all variables
local exclvar1 in var2 var3 ................ var10 // exclude var1
local exclvar15 in var2 var3 ................ var10 // exclude var1 & var5
foreach log in all exclvar1 exclvar15 {
eststo `log' {
}
}
logistic outcome `log'
I want stata to produce three different outputs with i) all variables, ii) excluding var1 & iii) excluding var1 & var5. After this it would store the output accordingly. Stata runs the code but only produces one output with "outcome" only.
Any corrections .... please. [thank you in advance]
Thank you.
BW,
Mukesh
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/