Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Joseph Luchman <jluchman@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | st: Update to program - tuples - on SSC |
Date | Thu, 1 Aug 2013 14:21:30 -0500 |
With many thanks to Kit Baum, an update to the program - tuples - is available on SSC. The update has two separate version requirements: For the new standard computation, Stata version 10 is required For computation with the "nomata" option, Stata version 8 is required. Nick Cox and I have been working to speed up the algorithm to compute all possible tuples which, as is noted in the help file of the previous version, is naive and slow for longer lists (i.e., up to or greater than 7). The updated version brings the computation of all "ntuples" into Mata using cvpermute(). Computation time savings is especially pronounced around 7 elements/variables in the list. For example compare computation speed using both: tuples a b c d e f g h i j, display nomata tuples a b c d e f g h i j, display The "display" option helps to illustrate the speed boost gained with the Mata approach. Moreover, the speed boost helps to make long lists feasible within a _reasonable_ time period. For example, all combinations of letters from a to t (20 elements and 1,048,575 combinations) in the English alphabet - on my Dell Optiplex 990 with an Intel i7-2600 processor (3.4 GHz) with Stata 12.1 MP took about 1.5 minutes to complete - after this number of elements wait times begin to grow more lengthy. The results are presented in the same way as the previous versions (i.e., in the same order), which can be observed by using the "display" option. For users with Stata versions 8 and 9, - tuples - will still work just as it did previously, save that you will have to add the "nomata" option. The algorithm has only been tested up to about 23 elements. Please feel free to contact Nick and I about the program if issues are encountered during use or for suggestions. To update type: adoupdate tuples, update For an excellent discussion of the command please see Nick's previous post on Statalist in 2006. http://www.stata.com/statalist/archive/2006-12/msg00060.html - joe Joseph Nicholas Luchman, M.A. ---- Senior Research Associate | Fors Marsh Group Email: jluchman@forsmarshgroup.com forsmarshgroup.com ---- Doctoral Candidate Industrial Organizational Psychology George Mason University https://www.researchgate.net/profile/Joseph_Luchman/ * * 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/