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: non-mutually exclusive factors


From   "Benhoen2" <[email protected]>
To   <[email protected]>
Subject   st: non-mutually exclusive factors
Date   Fri, 8 Oct 2010 16:28:57 -0400

I have some factors that are not mutually exclusive and i want to bin my
data among the various permutations of the factors. 

For example say there are two factors A and B.  There are 4 possibilities:
none, A, B and AB.  For 3 factors A B & C there are 8 possible outcomes:
none, A, B, C, AB, AC, BC, and ABC.  As the number of factors grows the
number of permutations doubles, e.g., 5 factors have 64 permutations.  

Is there any clever .do file to bin cases between multiple factors?  Or
alternatively any advice on a loop file that both bins the cases, and uses
the factor name to create labels.  I have 5 factors I am interested in
binning between.

Thanks, as always,

Ben  

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