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

Re: st: descending sort with svy: tab


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: descending sort with svy: tab
Date   Fri, 05 Aug 2005 16:36:16 -0400

One way to get what you want, assuming you don't need standard errors or confidence intervals, is us use -tabulate- with iweights (and NOT use -svy:-).

E.g.

tab var1 if var2==1 [iw=weight], sort

This will give you the same point estimates as svy: tab, and allow you access to the sort option.

Best,
Nick WInter



At 08:58 AM 8/5/2005, you wrote:

This is probably too simple to post, but I'm nearing a deadline and am
not making progress on my own.

I have a large data set with ICD-9 diagnostic information.  I want to
locate the most frequently listed ICD-9 codes by several sub-groups.
The data are from a complex survey design, so the svy commands are
warranted.  However, I cannot seem to translate:

tab var1 if var2==1, sort

into

svy, subpop(var2): tab var1, sort

Any ideas?  I'm working with STATA 9.0

Mary



*
*   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/
--------------------------------------------------------
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government [email protected] e
308 White Hall falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601

*
* 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