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

st: subpop question

From   "Marilyn Matevia" <>
Subject   st: subpop question
Date   Sat, 16 Apr 2005 00:59:16 -0000

Sorry to sneak in on this thread, but I can't figure out how to get
my question posted...

I'm trying to figure out how to something like a 3-way cross-
tabulation.  I have a categorical behavior variable, and categorical
demographic variables.  I want a chi-square on the demographics WHEN
the behavior variable is "1", so something like...

svytab ctsage sexor if CurrSmkr==1, subpop(femsub) ci

When I put in that CurrSmkr==1 (of a 1/0 variable) (I know that this
kind of specification is not advisable in svytab), which happens to
be about 64% of my sample, the demographic percentages are
calculated as proportions that add up to 64%.  I either want Stata
to see this as the whole sample (100%) in this case, OR I want -
essentially - a 3-way comparison... sex X age when CurrSmkr=1 and
sex X age when CurrSmkr=0.  Is that possible?  Do I need a "by"
group, and if so, what is the syntax for that?  I'm finding my
documentation less than helpful in this regard.

Thanks in advance; you all are terrific resources!

*   For searches and help try:

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