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

st: testing PH in a Cox model

From   Ricardo Ovaldia <>
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
 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 Ovaldia, MS
 Oklahoma City, OK

*   For searches and help try:

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