Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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


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.




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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index