Statalist


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

st: Re: testing PH in a Cox model


From   Ricardo Ovaldia <[email protected]>
To   [email protected]
Subject   st: Re: testing PH in a Cox model
Date   Mon, 23 Mar 2009 07:57:44 -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 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index