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]

Re: st: Combinations of variables


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Combinations of variables
Date   Tue, 04 Jun 2013 10:21:54 -0400

if I understand you correctly, I would use -egen- with the "concat"
option and then just tabulate the new variable (possibly using the sort
option as in -ta newvar, sort-

Rich

On 6/4/13 10:14 AM, Seliger Florian wrote:
> Dear Statalist,
> 
> I need to find the most frequent combinations of variables in my dataset.
> There are 12 variables of interest each coded 0/1.
> 
> Example:
> 
> ID           var1       var2       var3 ..
> 1             0             1             0
> 2             0             0             1
> 3             0             1             0
> 4             1             1             1
> 5             0             1             0
> .
> .
> .
> 
> In this example, the most frequent combination is var1=0, var2=1, var3=0 (for ID 1, 3, 5).
> 
> At the moment, I have no idea how to find out the combinations for so many different cases automatically.
> 
> 
> Thanks for your consideration.
> 
> Florian
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index