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]

st: Stata programming question


From   "Data Analytics Corp." <[email protected]>
To   Statalist <[email protected]>
Subject   st: Stata programming question
Date   Thu, 13 Jan 2011 15:52:13 -0500

Hi,

I have a programming question. I want to run an alternative-specific conditional logit model (asclogit) with a casevars option that has a varying number of variables in the varlist. In particular, the varlist has up to four variables: age, gender, region, status. All are strings so dummies have to be created for each. I want the individual calls to asclogit to estimate a model with all four variables, with all combinations of three of the four, with two of the four, and with just one of each of the four. There are 2^4 = 16 combinations and hence 16 estimations. How can I write a program to loop through all 16 estimations? I want to avoid having to write out each of the 16.

Thanks,

Walt

________________________

Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
[email protected]
www.dataanalyticscorp.com
_____________________________________________________

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