Statalist


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

Re: st: twoway tables


From   Philip Ryan <[email protected]>
To   [email protected]
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).

or

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.

Phil





Quoting Steve Pitts <[email protected]>:

> 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:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Philip Ryan
Professor
Discipline of Public Health

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

University of Adelaide
5005 South Australia
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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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