Basic syntax:
---------------                                         
combin x, k(#)                                          
                                                
Description     
-----------                                     
combin generates `k' unique combinations from a set of `n' objects, where `k' i
> s not greater than 5 (2 =< k <= 5).
Program first arranges `k' possible permutations and then retains unique combin
> ations. It supports both string and numeric variables.
                                                
combination: [n! / k!(n-k)!]                    

n: total number of observations k: unique combinations (original) k unique combinations (k=2, n=4) +----+ +-----+-----+ | x | ===> | x_1 | x_2 | +----+ +-----+-----+ | A | | A | B | | B | | A | C | | C | | A | D | | D | | B | C | +----+ | B | D | | C | D | +-----+-----+ (original) k unique combinations (k=3, n=4) +----+ +-----+-----+-----+ | x | ===> | x_1 | x_2 | x_3 | +----+ +-----+-----+-----+ | A | | A | B | C | | B | | A | B | D | | C | | A | C | D | | D | | B | C | D | +----+ +-----+-----+-----+

Examples: --------- combin x, k(2) combin x, k(3) combin x, k(4) combin x, k(5)

Author Muhammad Rashid Ansari INSEAD Business School 1 Ayer Rajah Avenue, Singapore 138676 > rashid.ansari@insead.edu