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


From   "Delahanty, Ryan" <[email protected]>
To   "[email protected]" <[email protected]>
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,

Ryan

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