Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: -groups- updated on SSC
From 
 
Nick Cox <[email protected]> 
To 
 
"'[email protected]'" <[email protected]> 
Subject 
 
st: -groups- updated on SSC 
Date 
 
Wed, 1 Feb 2012 12:11:09 +0000 
Thanks to Kit Baum, -groups- has been updated on SSC. -groups- was written up in 
SJ-3-4  pr0011  . . . . . . . .  Speaking Stata: Problems with tables, Part II
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q4/03   SJ 3(4):420--439                                 (no commands)
        reviews three user-written commands (tabcount, makematrix,
        and groups) as different approaches to tabulation problems
but it's been intermittently improved since. The latest update centres on an additional 
-saving()- option which arose from a question from William Parry. The requirement remains Stata 8 or up. 
The one-line summary of -groups- is that it lists group frequencies, which should immediately provoke the question of how it differs from numerous other tabulation programs, both official and user-written. 
The (relatively or absolutely) distinctive features of -groups- include, but are not limited to,  
* Support for cross-tabulation of any number of variables, the trick being that the tabulation is collapsed into a list and the machinery of -list- is used for presentation. Of course, you may run out of space to show the results nicely, but I can't solve that. 
* Support for showing zero frequencies for cross-combinations not present in the data, subject to combinatorial limitations. (Thus if you have 10 variables each with 10 distinct levels, the 10^10 joint possibilities far exceed Stata's limit, and your operating system may baulk at requests long before that.) 
* In showing cumulative frequencies or percents, support for all of > >= < <= (a niggly detail, but sometimes exactly what you want). 
* Considerable flexibility in selecting what is shown and how it is shown (including numeric formats for percents). 
* Now a -saving()- option for the results and thus indirectly scope for export of tabulated information to other programs. 
What -groups- doesn't do, and won't foreseeably do, is show summary statistics apart from frequencies, percents and so on for cross-combinations, _unless you have calculated them first and put them into variables_. As that last condition is often easy to satisfy, there is more scope to be useful. 
Nick 
[email protected] 
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/