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 <>
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:-).


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.

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


svy, subpop(var2): tab var1, sort

Any ideas?  I'm working with STATA 9.0


*   For searches and help try:
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government e
308 White Hall w
Cornell University
Ithaca, NY 14853-4601

* For searches and help try:

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