[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: I want to obtain Tables with all categories of every variables

From   "Nick Cox" <>
To   <>
Subject   RE: st: I want to obtain Tables with all categories of every variables
Date   Mon, 2 Feb 2009 17:11:59 -0000

In addition to several other answers, some of which seem to tackle
Carmen's problem and others which could be useful anyway, there are also
-groups- and -tabcount- from SSC. 

A write-up accessible to all, SJ subscribers or not, is at 

SJ-3-4  pr0011  . . . . . . . .  Speaking Stata: Problems with tables,
Part II
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q4/03   SJ 3(4):420--439                                 (no
        reviews three user-written commands (tabcount, makematrix,
        and groups) as different approaches to tabulation problems

This can be seen on-line at


The key problem behind Carmen's problem was well explained by Maarten
Buis: How is Stata to know about values that might exist as far you are
concerned but don't exist in the data? 

Ben Jann's -fre- implements one natural Stataish idea, that for
categorical variables a value label will be defined. 

-tabcount- in particular implements a more mundane idea: you spell out
to Stata which values you want to tabulate. It also adds a less usual
twist: you can specify bins using inequalities (which need not be


carmen gamarra

> I want to obtain tables with all categories of every variables, even
those of value=zero

*   For searches and help try:

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