Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Tables and row/column percentages

From   Rufus Browning <[email protected]>
To   [email protected]
Subject   Re: st: Tables and row/column percentages
Date   Tue, 28 Oct 2003 18:52:26 -0800


You're right about the inefficiency of dozens of separate tabulations. Two suggestions: use -table- to generate means that are proportions, and use -svytabs-.


If your "dependent" variable is 0,1 or can sensibly be made 0,1 another possibility is to use the -table- command to generate "means" (i.e., proportions) of that variable within categories of row, column (supercolumn, superrow) variables. -table- takes pweights, e.g.

. table district villtype [pw=weightvar] , contents(mean marriage) row col format(%5.3f)

Then I like to see the corresponding table of frequencies:

. table district villtype if marriage != . , c(freq) row col


I've also found -svytabs- by Michael Blasnik to be helpful for some kinds of problems:
package svytabs from
'SVYTABS': module to Create Tables for export Combining Multiple Survey Tabulations

svytabs generates a variety of tables using calls to Stata's
svytab command. Its advantages over svytab are in convenience
and formatting. A single svytabs command can generate a table
that would require many svytab commands and tedious assembly of
results. By default, tables of percentages are created in a
comma delimited format that can be saved to a text file for
importing to other documents. Statistically significant
differences can be flagged with asterisks. Standard errors,
confidence intervals, design effects, and population counts can
also be produced. Detailed output can be logged while tables are
saved in separate files.

Hope this helps.

Rufus Browning
[email protected]

At 11:56 AM 10/28/2003 -0500, LUCIANA SURAN wrote:

Dear Statalist,

I have a question concerning the "table" command, and actually, the usage of
tables in general in STATA.  I am workign with a dataset in which I would
like to examine variables such as marriage by a number of different
indicator variables, such as district, village type (i.e. intervention vs.
control), age, etc.   Also, I need to examine the data using a pweight.

I was wondering if there is anyway to get row/column percentages using the
"table"" command.  I know that I could get these percentages using the "tab"
command, but I find it inefficient to run lots of tabs and have the output
be scattered all over the place.

In sum, I was wondering if there is anyway to get row/column percentages for
a number of different variables in one step.

I would appreciate your help very much.


*   For searches and help try:

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