Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: testing PH in a Cox model


From   Ricardo Ovaldia <ovaldia@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: testing PH in a Cox model
Date   Mon, 23 Mar 2009 10:11:40 -0700 (PDT)

Dear all,

 I am confused about the behavior of -cox,tvc()- when
 testing the PH assumption in Cox regression.
 
 I assumed that -tcv()- was simply creating an interaction
 term between the covariate and time (_t, by default). Which
 is how I understood the assumption was ben tested.
 However, when I do this manualy I get very different
 results.
 
 Here is an example using the cancer data:
 
 sysuse cancer, clear
 stset  studytime, f( died)
 gen d=0
 replace d=1 if drug>1
 gen dt=d*_t
 stcox  d, tvc(d) nolog
 stcox  dt, nolog
 

 What I am doing wrong?
 
 Thank you,
 Ricardo.

 Ricardo Ovaldia, MS
 Statistician 
 Oklahoma City, OK
 
 


      
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index