| |
 |
|
|
Science Forum Index » Statistics - Math Forum » Logistic regression for Drugs Interactions
Page 1 of 1
|
| Author |
Message |
| franco |
Posted: Wed Mar 14, 2007 3:12 pm |
|
|
|
Guest
|
Hi,
I have the model below, for which I run a logistic regression
including the interaction term (NSAID*Diuretic)
------------------------
fit1=glm(resp ~ nsaid+diuretic+I(nsaid*diuretic), family=
binomial,data=w)
NSAID Diuretic Nausea+ve Nausea-ve
0 0 185 6527
0 1 53 1444
1 0 42 1293
1 1 25 253
Coefficients Std. Error z value Pr(>|z|)
(Intercept) -3.56335 0.07456 -47.794 < 2e-16 ***
NSAID 0.13630 0.17361 0.785 0.43242
Diuretic 0.25847 0.15849 1.631 0.10293
NSAID*Diuretic 0.85407 0.30603 2.791 0.00526 **
-------------------------------
Odds ratio of Nausea when on Diuretic is exp(0.25847)= 1.29
and the odds ratio of Nusea when on NSAID is exp(0.13630)=1.14
Normally when we want to see the odds ratio of Nausea when a patient
is on both drugs we multiply 1.29*1.14= 1.48 (is this correct? do we
multiply or do we add,)
But since the interaction term is significant then we take that into
account? Does that mean that the odds ratio of the interaction is
exp(0.25847)*exp(0.13630)*exp(0.85407)= 3.486297 ?
Or do we use additions?
Thanks. |
|
|
| Back to top |
|
| Bruce Weaver |
Posted: Wed Mar 14, 2007 4:00 pm |
|
|
|
Guest
|
franco wrote:
Quote: Hi,
I have the model below, for which I run a logistic regression
including the interaction term (NSAID*Diuretic)
------------------------
fit1=glm(resp ~ nsaid+diuretic+I(nsaid*diuretic), family=
binomial,data=w)
NSAID Diuretic Nausea+ve Nausea-ve
0 0 185 6527
0 1 53 1444
1 0 42 1293
1 1 25 253
Coefficients Std. Error z value Pr(>|z|)
(Intercept) -3.56335 0.07456 -47.794 < 2e-16 ***
NSAID 0.13630 0.17361 0.785 0.43242
Diuretic 0.25847 0.15849 1.631 0.10293
NSAID*Diuretic 0.85407 0.30603 2.791 0.00526 **
-------------------------------
Odds ratio of Nausea when on Diuretic is exp(0.25847)= 1.29
and the odds ratio of Nusea when on NSAID is exp(0.13630)=1.14
Normally when we want to see the odds ratio of Nausea when a patient
is on both drugs we multiply 1.29*1.14= 1.48 (is this correct? do we
multiply or do we add,)
But since the interaction term is significant then we take that into
account? Does that mean that the odds ratio of the interaction is
exp(0.25847)*exp(0.13630)*exp(0.85407)= 3.486297 ?
Or do we use additions?
Thanks.
Exp(b) for the product term gives you the ratio of two odds ratios. Let
b1, b2, and b3 be the coefficients for NSAID, Diuretic, and the product
term. One way to look at it is:
OR for NSAID when Diuretic = 1
Exp(b3) = ------------------------------
OR for NSAID when Diuretic = 0
Alternatively,
OR for Diuretic when NSAID = 1
Exp(b3) = ------------------------------
OR for Diuretic when NSAID = 0
NSAID Diur +ve -ve
0 0 185 6527
0 1 53 1444
1 0 42 1293
1 1 25 253
To illustrate with your data:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
OR for NSAID when Diuretic = 0 = (42*6527)/(1293*185) = 1.1460
2.6922/1.1460 = 2.3492
Your b3 = 0.85407
Exp(b3) = 2.3492
You can show the same thing by working out the OR for Diuretic when
NSAID=1 and dividing by the OR for Diuretic when NSAID=0. You will get
the same ratio of odds ratios.
If you look at the coefficients themselves (without exponentiating),
then things are additive rather than multiplicative.
James Jaccard's (Sage) monograph, "Interaction Effects in Logistic
Regression", has a nice discussion of this.
--
Bruce Weaver
bweaver@lakeheadu.ca
www.angelfire.com/wv/bwhomedir |
|
|
| Back to top |
|
| franco |
Posted: Wed Mar 14, 2007 4:33 pm |
|
|
|
Guest
|
On Mar 14, 10:00 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
....<Snipped for brevity>
Quote: OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
OR for NSAID when Diuretic = 0 = (42*6527)/(1293*185) = 1.1460
2.6922/1.1460 = 2.3492
Your b3 = 0.85407
Exp(b3) = 2.3492
....<Snipped for brevity
Thanks that was very useful. But what still puzzels me that:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value? |
|
|
| Back to top |
|
| Bruce Weaver |
Posted: Wed Mar 14, 2007 8:03 pm |
|
|
|
Guest
|
franco wrote:
Quote: On Mar 14, 10:00 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
...<Snipped for brevity
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
OR for NSAID when Diuretic = 0 = (42*6527)/(1293*185) = 1.1460
2.6922/1.1460 = 2.3492
Your b3 = 0.85407
Exp(b3) = 2.3492
...<Snipped for brevity
Thanks that was very useful. But what still puzzels me that:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value?
I'm not sure why you expect them to be the same. If those two odds
ratios were identical, then the odds ratios for NSAID when Diuretic = 0
and the odds ratio for Diuretic when NSAID = 0 would also have to be
identical, because the multiplicative factor has to be 2.3492 [your
Exp(b) for the product term] for both variables.
Maybe someone else can offer a better answer.
--
Bruce Weaver
bweaver@lakeheadu.ca
www.angelfire.com/wv/bwhomedir |
|
|
| Back to top |
|
| Ray Koopman |
Posted: Thu Mar 15, 2007 2:32 am |
|
|
|
Guest
|
franco wrote:
Quote: On Mar 14, 10:00 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
...<Snipped for brevity
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
OR for NSAID when Diuretic = 0 = (42*6527)/(1293*185) = 1.1460
2.6922/1.1460 = 2.3492
Your b3 = 0.85407
Exp(b3) = 2.3492
...<Snipped for brevity
Thanks that was very useful. But what still puzzels me that:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value?
Think about the effects in terms of the logs of the odds.
They act like cell means in a 2 x 2 anova.
_______________Diuretic_______________
0 1
| 0 log( 185 / 6527 ) log( 53 / 1444 )
| = -3.56335 = -3.30488 .25847
NSAID|
| 1 log( 42 / 1293 ) log( 25 / 253 )
| = -3.42705 = -2.31451
.13630 .85407
The intercept, which with 0/1 coding would be more appropriately
called the baseline, is the log odds for the (0,0) cell.
The NSAID effect is the simple effect of NSAID when Diuretic = 0:
(-3.42705) - (-3.56335) = .13630
The Diuretic effect is the simple effect of Diuretic when NSAID = 0:
(-3.30488) - (-3.56335) = .25847
The interaction is the amount by which the (1,1) cell differs from
what would be expected if the two simple effects were additive:
(-2.31451) - (-3.56335 + .13630 + .25847) = .85407 |
|
|
| Back to top |
|
| franco |
Posted: Thu Mar 15, 2007 2:50 am |
|
|
|
Guest
|
On 15 mrt, 02:03, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
Quote: OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value?
I'm not sure why you expect them to be the same. If those two odds
ratios were identical, then the odds ratios for NSAID when Diuretic = 0
and the odds ratio for Diuretic when NSAID = 0 would also have to be
identical, because the multiplicative factor has to be 2.3492 [your
Exp(b) for the product term] for both variables.
Maybe I didn't ask my question correctly, what I wanted to say was:
If I ask someone "what is the Odds Ratio of having Nausea when a
patient is taking both NSAIDS and Diuretics, compared to when he is
taking neither?"
Quote: From what I understood from you I'd get two answers= one would tell me
the OR is 2.6922, and another would say the OR is 3.0421! |
|
|
| Back to top |
|
| Bruce Weaver |
Posted: Thu Mar 15, 2007 9:12 am |
|
|
|
Guest
|
franco wrote:
Quote: On 15 mrt, 02:03, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value?
I'm not sure why you expect them to be the same. If those two odds
ratios were identical, then the odds ratios for NSAID when Diuretic = 0
and the odds ratio for Diuretic when NSAID = 0 would also have to be
identical, because the multiplicative factor has to be 2.3492 [your
Exp(b) for the product term] for both variables.
Maybe I didn't ask my question correctly, what I wanted to say was:
If I ask someone "what is the Odds Ratio of having Nausea when a
patient is taking both NSAIDS and Diuretics, compared to when he is
taking neither?"
From what I understood from you I'd get two answers= one would tell me
the OR is 2.6922, and another would say the OR is 3.0421!
The odds ratio you describe is not usually calculated for this design,
and is equal to neither of those values. The 2x2 table for the odds
ratio you are describing is:
+ive -ive
Both (1,1) 25 253
Neither (0.0) 185 6527
So the OR = (25*6527)/(253*185) = 3.486
--
Bruce Weaver
bweaver@lakeheadu.ca
www.angelfire.com/wv/bwhomedir |
|
|
| Back to top |
|
| Ray Koopman |
Posted: Fri Mar 16, 2007 12:55 am |
|
|
|
Guest
|
franco wrote:
Quote: On 15 mrt, 02:03, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
OR for NSAID when Diuretic = 1 = (25*1444)/(253*53) = 2.6922
AND
OR for Diuretic when NSAID = 1 = (25*1293)/(253*42) = 3.0421
also verified by
exp(0.25847)*exp(0.85407)=3.0421
Why do we have 2 odds ratios (that are different) since when a patient
is taking the combination of the two drugs his odds ratio for nausea
should be fixed at one value?
I'm not sure why you expect them to be the same. If those two odds
ratios were identical, then the odds ratios for NSAID when Diuretic = 0
and the odds ratio for Diuretic when NSAID = 0 would also have to be
identical, because the multiplicative factor has to be 2.3492 [your
Exp(b) for the product term] for both variables.
Maybe I didn't ask my question correctly, what I wanted to say was:
If I ask someone "what is the Odds Ratio of having Nausea when a
patient is taking both NSAIDS and Diuretics, compared to when he is
taking neither?"
From what I understood from you I'd get two answers= one would tell me
the OR is 2.6922, and another would say the OR is 3.0421!
Again, look at the logs of the odds. The effect you are interested in,
log(1,1) - log(0,0) = 1.24883, is the sum of the two simple effects
and the interaction, .13630 + .25847 + .85407. |
|
|
| Back to top |
|
| franco |
Posted: Sat Mar 17, 2007 7:52 am |
|
|
|
Guest
|
On 16 mrt, 06:55, "Ray Koopman" <koop...@sfu.ca> wrote:
Quote: Again, look at the logs of the odds. The effect you are interested in,
log(1,1) - log(0,0) = 1.24883, is the sum of the two simple effects
and the interaction, .13630 + .25847 + .85407.
Yes, indeed. Thanks all for the help. Franco. |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Mon Dec 01, 2008 9:22 am
|
|