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: generate multi-level dummy


From   "Delahanty, Ryan" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: generate multi-level dummy
Date   Fri, 22 Oct 2010 09:50:03 -0500

Hello,

We have a very high dimensional dataset. There are several categorical variables for which we need to get unique ORs for each combination. For example:

Var1=1,2,3...n
Var2=1,2,3...m

We need to generate all n x m  categories for logistic regression. So our logistic regression can take the form:

Logistic y 11 12 13 ... 1m...21 22 23...2n...nm

This way we can get ORs for all levels from 11 to nm.

What is the easiest way to generate a new dummy variable that has all of these combinations and is still unique?

Thanks,

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