Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: Generating comparison/contingency tables


From   [email protected]
To   [email protected]
Subject   Re: st: Re: Generating comparison/contingency tables
Date   Sat, 30 May 2009 21:58:00 -0400

--
Tomas

I should explain that you can use -tabout- with non-survey data.
However the command uses  a -svy- command internally to generate and
display standard errors and confidence intervals.  Accordingly you
must still -svyset- your data, but leave it with its non-survey
characteristics (no weights, PSUs = observations)..  The command
"svyset _n"  does that for the data, and the option "svy" in -tabout-
makes it happen.

-Steve

On Fri, May 29, 2009 at 9:15 PM,  <[email protected]> wrote:
> Weights have nothing to do with it.  Simply -svyset- the data and use
> the "svy" option
>
> *****************************************************
> sysuse nlsw88,clear
> svyset _n
> tabout south race smsa coll using table3.txt, replace ///
> c(row ci) f(1 1 ) clab(Row_% 95%_CI)  svy ///
> npos(lab) per
> ****************************************************
>
> -Steve
>
> On Fri, May 29, 2009 at 5:38 PM, Martin Weiss <[email protected]> wrote:
>> <>
>>
>> The dataset employed in the pdf is not a survey dataset as such- it is
>> turned into one on page 29 via
>>
>> -gen wt = int(uniform()*10)-
>>
>>
>> and, by implication,
>>
>> -svyset wt-
>>
>> which sort of tricks Stata into thinking it is dealing with survey data,
>> although the weights are pure noise.
>>
>> I think you could do the same to your data...
>>
>>
>> HTH
>> Martin
>> _______________________
>> ----- Original Message ----- From: "Tomas M" <[email protected]>
>> To: <[email protected]>
>> Sent: Friday, May 29, 2009 9:43 PM
>> Subject: st: Generating comparison/contingency tables
>>
>>
>>> Hello Statalisters,
>>>
>>> Essentially, I want to create a comparison table, comparing a set of
>>> categorical predictor variables between outcome variables.  I specifically
>>> want the Row %, with the 95% CI.
>>>
>>> The exact table I want can be found at:
>>> http://www.ianwatson.com.au/stata/tabout_tutorial.pdf, page 20.  This
>>> -tabout- command would be perfect, except that it requires survey data for
>>> that given example.
>>>
>>>
>>> I want:
>>>
>>> --------------.......Outcome 1.......Outcome 2.......Outcome 3.....--
>>> ---Predictor 1.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>> ---Predictor 2.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>> ---Predictor 3.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>> ---Predictor 4.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>> ---Predictor 5.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>> ---Predictor 6.....Row %, 95% CI...Row %, 95% CI...Row %, 95% CI...--
>>>
>>> Does anyone know how to do this with Stata?
>>>
>>> I have tried estpost (but no -by- option with CI), fsum (but this switches
>>> around the rows and columns), tabstat (which allows me to switch rows and
>>> columns to my preferred orientation, but there no CI option).
>>>
>>> I would appreciate any help at all!
>>>

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



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