Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Michael Stewart <michaelstewartresearch@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | st: Re: using categorical and continuous variables foreach loop for univaraite analysis |
Date | Mon, 8 Jul 2013 18:51:54 -0400 |
Hello all, In my research project, I have a number of categorical predictors(cat1 cat2 cat3 cat4 ) and continuous predictors(con1 con2 con3 con4) and during initial uni-variate analysis, I am using two step process to evaluate for statistical significance.My code is a follows I use stata 12 *********************MY CODE ******************** foreach x of varlist cat1 cat2 cat3 cat4{ logit outcome i.`x' } foreach x of varlist con1 con2 con3 con4{ logit outcome `x' } ******************************************************** Question: Is it possible to achieve this is one step i.e., use continuous and predictors as a single varlist but perform logistic regression still respecting the fact that some are categorical variables and some are continuous variables -- Thank you in advance for your time and consideration, Yours Sincerely, Mike. * * 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/