Stata 15 help for mf_comb

[M-5] comb() -- Combinatorial function


real matrix comb(real matrix n, real matrix k)


comb(n, k) returns the elementwise combinatorial function n-choose-k, the number of ways to choose k items from n items, regardless of order.


comb(n, k): n: r1 x c1 k: r2 x c2, n and k r-conformable result: max(r1,r2) x max(c1,c2)


comb(n, k) returns missing when either argument is missing or when the result would be larger than 10^300.

Source code

Function is built in.

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