Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: question about permutation combinations of rows in stata


From   "Jesper K. Hansen" <[email protected]>
To   [email protected]
Subject   Re: st: question about permutation combinations of rows in stata
Date   Sat, 12 Jul 2008 21:22:03 +0200

Dalhia,

On Sat, Jul 12, 2008 at 19:33, Dalhia <[email protected]> wrote:
> hi, Is there a way to automatically perform permutation combination of specified rows in stata.  I have data on the list of participants for bunch of deals. Here is how my data is currently:
>
> Deal_1, participant_1
> Deal_1, participant_2
> Deal_1, participant_3
> Deal_1, participant_4
> Deal_2, participant_11
> Deal_2, participant_12
>
> Here is what I want the data to appear as:
>
> participant_1, participant_2
> participant_1, participant_3
> participant_1, participant_4
> participant_2, participant_3
> participant_2, participant_4
> participant_3, participant_4
> participant_11, participant_12
>
> Basically I want to show the ties between participants of deals. Hence I need the permutation combinations of all participants in each deal.  Is there a way to automate this at least to a certain extent in stata?
>

have a look at the command -tuples-, written Nick J. Cox. It can be
downloaded from SSC with

-ssc install tuples-

-tuples- sets out to create permutations of a list (of variables); but
you should be able to get what you want with the command.

/Jesper K. Hansen
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index