Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: How to best describe interaction between a dummy variable and a continuous one in logistic regression?


From   "daniel waxman" <[email protected]>
To   <[email protected]>
Subject   RE: st: How to best describe interaction between a dummy variable and a continuous one in logistic regression?
Date   Sat, 4 Feb 2006 11:02:27 -0500

Thank you very much, Svend, Michael, John, and Clive.

At least I can take solace in knowing that the question is not a trival one.

It looks to me like the residual variation is perhaps borderline (not
completeley sure what to do with that).  And I have a little bit of trouble
reconciling what -mhodds- gives me (see below) as compared to doing
-by romi: logistic outcome zlog-

And I have a very interesting looking graph produced (slowly) by -inteff-
which I'd be happy to pass on off-list to anyone interested.

Vibl comes next, as does ordering my copy of the stata journal...

(if anyone is getting a big picture idea for how to describe this particular
interaction in a way that doesn't make a reviewer for a cardiolgy journal
have a seizure, I'd be most greatful)
*****

. complogit is_dead zlog, group(romi)

                                                  Number of obs   =
20449
                                                  Wald chi2(2)    =
334.45
Log likelihood = -3759.6533                       Prob > chi2     =
0.0000

----------------------------------------------------------------------------
--
     is_dead |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
eq1          |
        zlog |   .8506914   .0536334    15.86   0.000     .7455718
.955811
        romi |  -.8017628   .3580006    -2.24   0.025    -1.503431
-.1000946
       _cons |  -1.667314   .0683411   -24.40   0.000     -1.80126
-1.533368
-------------+--------------------------------------------------------------
--
delta        |
        romi |   .3088438   .1507395     2.05   0.040     .0133998
.6042878
----------------------------------------------------------------------------
--
(...output omitted...)


residual variation using -complogit-

----------------------------------------------------------------------------
----
Likelihood ratio test to reject null hypothesis of equal residual variation
----------------------------------------------------------------------------
----

Likelihood-ratio test                                  LR chi2(1)  =
4.75
(Assumption: two nested in allison_1)                  Prob > chi2 =
0.0293


. mhodds is_dead zlog

Score test for trend of odds with zlog

(The Odds Ratio estimate is an approximation to the odds ratio 
for a one unit increase in zlog)

    ----------------------------------------------------------------
     Odds Ratio    chi2(1)        P>chi2        [95% Conf. Interval]
    ----------------------------------------------------------------
       2.538749     289.60        0.0000         2.280442   2.826315
    ----------------------------------------------------------------


. mhodds is_dead zlog ,by(romi) , if $bi | $slr 

Score test for trend of odds with zlog
by romi

(The Odds Ratio estimate is an approximation to the odds ratio 
for a one unit increase in zlog)

----------------------------------------------------------------------------
---
     romi | Odds Ratio        chi2(1)         P>chi2       [95% Conf.
Interval]
----------+-----------------------------------------------------------------
---
        0 |   2.789601         264.14         0.0000         2.46497
3.15699
        1 |   6.212236         133.33         0.0000         4.55617
8.47025
----------------------------------------------------------------------------
---

    Mantel-Haenszel estimate controlling for romi
    ----------------------------------------------------------------
     Odds Ratio    chi2(1)        P>chi2        [95% Conf. Interval]
    ----------------------------------------------------------------
       3.113895     375.37        0.0000         2.775876   3.493075
    ----------------------------------------------------------------

Test of homogeneity of ORs (approx): chi2(1)   =   22.10
                                     Pr>chi2   =  0.0000

. 


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



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