Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Looping over variables in more than one group


From   jaweria seth <jaweriaseth@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Looping over variables in more than one group
Date   Tue, 6 Mar 2012 16:01:20 -0600

Hi,

I would like to run regressions with up to 4 different variables. My
variables are separated into 4 groups with 5-30 variables in each
group. I would like to run regression combos of different variables to
find the best model:
How do I regress my y variable on 1 variable from group 1 and 1 from
group 2 and loop through different combos of each?
for ex:
regress Yvariable Group1 Group2

Then I would like to add a variable from group 3, and so on..

Any  help would be appreciated. Thanks!

-- 
J. Seth
*
*   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   |   Site index