Bookmark and Share

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: Comparing groups


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Comparing groups
Date   Thu, 17 Jan 2013 20:44:43 +0100

On Thu, Jan 17, 2013 at 8:22 PM, MIGUEL ANGEL GRUPO DE INVESTIGACIO
ODONT SIMANCAS PALLARES wrote:
> But my question is adressed to know if is correct to use X2 test to
> compare the treatment groups having in mind that the outcome is
> dichotomus (compare two treatment estrategies when the outcome is
> dichotomus).

The Chi square test is just a test of no association in the entire
table, so that is not what you want (I think). I would just use
logistic regression in that case:

*------------------ begin example ----------------------
// get some data
use http://www.stata-press.com/data/r12/lbw.dta, clear

// create our 3 value "drug" variable
// 0 plays the role of the placebo and 1 and 2 are the
// competing "drugs"
gen byte drug = cond(ftv==0,0,                    ///
                cond(ftv==1,2,3)) if ftv < .
label define drug 0 "0 visits to doctor"          ///
                  1 "1 visit to doctor"           ///
                  2 "more than 1 visit to doctor"

// The logit output gives you directly tests the comparisons
// drug 1 versus placebo and drug 2 versus placebo
// In this case both are not significant				
logit low ib0.drug, or
*-------------------- end example -----------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index