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

From |
Nick Winter <nw53@cornell.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: one-way tables with survey data |

Date |
Tue, 14 Jun 2005 08:17:34 -0400 |

Hi,

It is a limiteation of Stata 8's -svytab- that it does not do one-way tabulations directly. In version 9, this is supported.

However, this is a minor limitation, because you can create a second "variable" that is a constant, and use that as the second variable in a two-way crosstabulation. Like this:

. generate one = 1

. svytab myvar one

--Nick Winter

At 06:46 PM 6/13/2005, you wrote:

posting it again. I offer my profuse apologies if somehow it gets posted 3 times--this was not my intention.--------------------------------------------------------

I am working with a survey dataset and need to produce frequency distributions for a number of dichotomous variables. I have defined the dataset as survey data using the standard commands (Intercooled Stata v. 8.2):

svyset [pweight=pesomef]

The svytab command seems only to work with 2-way tables and the regular tab (tabulate, table, etc.) command produces the same result whether or not I define the data as survey data. I've read through the svytab command documentation several times as well as the documentation for table/tabulate commands and on Stata weights. Surely I'm missing something, but I can't figure out what.

Could someone please help me with the appropriate syntax to produce a weighted one-way table for these variables?

Thanks in advance,

Steve

*

* 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 nw53@cornell.edu 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/

**Follow-Ups**:**Re: st: one-way tables with survey data***From:*"Steven A. Harvey" <sharvey@jhsph.edu>

**References**:**st: one-way tables with survey data***From:*"Steven A. Harvey" <sharvey@jhsph.edu>

- Prev by Date:
**RE: st: Estimating Confidence Interval for ROC** - Next by Date:
**Re: st: Suggestion Stata GUI - another suggestiong** - Previous by thread:
**st: DoD using table ?** - Next by thread:
**Re: st: one-way tables with survey data** - Index(es):

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