Uri Goldbourt asked:
How does one use stata to compare odds ratio for an event compared in two subgroups of the sample?
For example: if one has diabetics and nondiabetics in a sample of patients with
coronary heart disease (CHD) ' of both genders, and wants to examine the
association between gender and mortality. How does one perform the statistical
testing of OR of mortality asociated with female gender among the diabetics in
comparison with the OR for mortality associated with female gender among the
non-diabetic patients?
---------------------------------------------------------------------
This is a typical question of interaction or effect modification. In the example
below the question is whether the odds ratio for hypertension - low birthweight
is different for smokers and non-smokers:
. clear
. webuse lbw.dta
. bysort smoke: logistic low ht
-> smoke = 0
Logistic regression Number of obs = 115
LR chi2(1) = 3.45
Prob > chi2 = 0.0631
Log likelihood = -63.214863 Pseudo R2 = 0.0266
------------------------------------------------------------------------------
low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ht | 4.426667 3.52853 1.87 0.062 .9280632 21.11427
------------------------------------------------------------------------------
-> smoke = 1
Logistic regression Number of obs = 74
LR chi2(1) = 0.82
Prob > chi2 = 0.3641
Log likelihood = -49.548688 Pseudo R2 = 0.0082
------------------------------------------------------------------------------
low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ht | 2.333333 2.206418 0.90 0.370 .3656572 14.88948
------------------------------------------------------------------------------
The odds ratios are somewhat different for smokers and non-smokers. Make a formal
analysis by including an interaction term between the two predictors. In this
example the interaction (_IhtXsmo_1_1) was not significant (P = 0.605):
. xi: logistic low i.ht*i.smoke
i.ht _Iht_0-1 (naturally coded; _Iht_0 omitted)
i.smoke _Ismoke_0-1 (naturally coded; _Ismoke_0 omitted)
i.ht*i.smoke _IhtXsmo_#_# (coded as above)
Logistic regression Number of obs = 189
LR chi2(3) = 9.14
Prob > chi2 = 0.0274
Log likelihood = -112.76355 Pseudo R2 = 0.0390
------------------------------------------------------------------------------
low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iht_1 | 4.426667 3.528532 1.87 0.062 .9280622 21.11429
_Ismoke_1 | 2.134286 .717116 2.26 0.024 1.104715 4.123393
_IhtXsmo_1_1 | .5271084 .6519036 -0.52 0.605 .0466845 5.95151
------------------------------------------------------------------------------
Hope this helps
Svend
________________________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone, work: +45 8942 6090
Phone, home: +45 8693 7796
Fax: +45 8613 1580
E-mail: [email protected]
_________________________________________________________
*
* 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/