Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: pairwise unique combination


From   Mazhar Islam <[email protected]>
To   [email protected]
Subject   st: pairwise unique combination
Date   Wed, 27 Jul 2005 13:28:43 -0700 (PDT)

Hi all,
I am struggling to create unique pairwise
combinations. I want to have nC2 combination i.e. from
a n number of observations I want to have unique
pairs. Can anyone help? I gave an example below to
explain what I want. Thanks a lot.



I have my data in the following format 
P   L
1   1.4
1   2.4
1   3.1
1   0.8
2   0.9
2   0.4
2   2.3
3   1.6
3   4.5
4   6.0

I want the following combination 


P   L1   L2
1   1.4  2.4
1   2.4  3.1
1   3.1  0.8
1   0.8  1.4
1   1.4  3.1
1   0.8  2.4 
2   0.9  0.4
2   0.4  2.3
2   2.3  0.9
3   1.6  4.5 
4   0     0

-Mazhar



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   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