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]

st: Margins command after Cox regression


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   st: Margins command after Cox regression
Date   Fri, 30 Dec 2011 06:46:58 -0600

I am trying to get margins expressed in probability units rather than
hazard ratios after Cox regression (Stata 12).

My command and output are:

. stcox ib6.dxn age i.sex

         failure _d:  vzoster
   analysis time _t:  _ndbtime
                 id:  patkey

Cox regression -- Breslow method for ties

No. of subjects =        31783                     Number of obs   =    203726
No. of failures =         1670
Time at risk    =       112866
                                                   LR chi2(4)      =     92.54
Log likelihood  =   -15665.104                     Prob > chi2     =    0.0000

------------------------------------------------------------------------------
          _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    dxngroup |
          2  |   2.675133   .3139785     8.38   0.000     2.125399    3.367056
          4  |   1.368017   .1075621     3.99   0.000      1.17264    1.595946
             |
         age |    1.01012   .0020599     4.94   0.000     1.006091    1.014166
       1.sex |   .7660175   .0510103    -4.00   0.000     .6722888    .8728135
------------------------------------------------------------------------------


margins dxn, at(age=(20 30 40 50 60 70 80))
marginsplot

(output omitted)

Any suggestion on how to do this?

Thanks,

Fred

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
NDB Office +1 316 263 2125 Ext 0
Research Office +1 316 686 9195
[email protected]
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index