Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: survey analysis : three-way table and use of "subpop"
From
Steven Samuels <[email protected]>
To
[email protected]
Subject
Re: st: survey analysis : three-way table and use of "subpop"
Date
Wed, 21 Sep 2011 18:30:47 -0400
To get disease prevalence, I should have added the "row" option to the -svy: tab- commands. This is corrected below.
S.
<redacted>-
Simplest is to use -svy: prop-
**************************************************
svy: prop Diseased, over(Age Gender Race)
*************************************************
The results list categories like _subpop_1, _subpop_2, but show a legend so that you know what is what.
If prevalence is low, a lower confidence interval endpoint could fall below zero. In that case, you should use four instances of -svy: tab-, because -svy: tab- computes confidence intervals for the logit of a proportion, then transforms back.
e.g.
******************************************************
svy, subpop(if Gender==0 & Race==0): tab Diseased Race, row
svy, subpop(if Gender==0 & Race==1): tab Diseased Race, row
etc.
******************************************************
Steve
On Sep 20, 2011, at 11:55 PM, <redacted>wrote:
Hi, I need help with svy analysis. I have 4 variables:
1) Diseased: yes=1 old=0
2) Gender: male=1 female=0
3) Age: young=1 old=0
4) Race: Malay=1 non-Malay=0
My svy command is :
Svyset ebid [weight=weight4], strata(strata) fpc(fpc)
Question:
I want to produce this table. This table looks like a three-way table.
==============================================================
Prevalence Prevalence
Male Female
Malay Mon malay Malay Non malay
Agegp
-young
-old
==============================================================
In a normal tabulate command, I can use "bysort gender: tabulate race age"
but in svy command, how can I do this? Should I use “subpop” command,
one time for male and the other time for female? will that be valid?
Are there any other options?
Svy, subpop(?): tab race age diseased
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/