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, is already up and running.

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

st: Pairing predictors in tuples.

From   Bradley Fedy <>
Subject   st: Pairing predictors in tuples.
Date   Mon, 2 Aug 2010 10:17:14 -0600


I am using tuples to cycle through models using different subsets of
predictors.  My code looks something like this:

tuples x1 x2 x3 x4 x5
forval i = 1/31{
      logit y `tuple`i"

However, I do not want all possible combinations.  I would like predictors
x4 and x5 to always enter the model together (i.e. one cannot be present
without the other).

Any suggestions on how to make x4 and x5 always enter the model together
would be greatly appreciated.


Stata Ver. 10.1

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index