[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: twoway tables

From   Philip Ryan <>
Subject   Re: st: twoway tables
Date   Sun, 8 Jul 2007 16:41:16 +0930

1. use -etab- from Dean Judson (-findit etab- will get you there).


2. learn about the -foreach- command (-help foreach-) and do it from "first
principles", eg:

foreach var of varlist var2 var3 var4 {
tab var1 `var'

will serially tabulate var1 against each of var2, var3 and var4.

Solution 2 should also work for the survey situation.


Quoting Steve Pitts <>:

> SAS generates two-way tables w respect to a single dependent variable in
> this handy way:
>     tables dep*(ind1 ind2 ind3)
> 1)  Can Stata do the same thing on a single command line instead of
> requiring me to specify each table separately?
>  - tab2 - generates all possible tables, unhandy when you've got a lot of
> independent variables
>   -tabsum- , -table- , -statsby-  , and -tabstat- don't seem to allow this
> either.
> 2)  Now how about the same question, using -svytab-?
> Thanks,
> Steve Pitts
> *
> *   For searches and help try:
> *
> *
> *

Philip Ryan
Discipline of Public Health

Director, Data Management and Analysis Centre
Associate Dean (IT)
Faculty of Health Sciences

University of Adelaide
5005 South Australia
CRICOS Provider Number 00123M
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright.  If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
*   For searches and help try:

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