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: new dummy variable based on two categorical variables

From   "Delahanty, Ryan" <>
To   "" <>
Subject   st: new dummy variable based on two categorical variables
Date   Sat, 16 Oct 2010 18:22:14 -0500

I had such awesome help from you stats ballers on this list with the last Q, I thought I'd take a spin again.

Please correct my language in this email if I'm off in proper terms.

Say I have two variables with i and j different levels, like this: var1=1,2,3,4; var2=1,2,3
And I want to get ORs on all 12 categories: 1,1; 1,2; 1,3; 2,1... 4,3.

What is the most efficient way to make a new categorical variable that contains all i x j combinations?

I know once complete, I want to do logistic this way:
xi, prefix(): logistic affec i.newvar

to get ORs.

Thanks again,


*   For searches and help try:

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