I am analyzing survival in a group of respiratory patients
it turns out that one of my variables (FVC, a measure of respiratory function expressed in percentage of predicted value, that is, the higher the better), has a time-varying effect on survival. If I do
stcox fvc
I get an highly significant effect:
HR .969788, 95% CI .9642006 .9754077
but estat phtest in unhappy:
Test of proportional-hazards assumption, Global test chi2 18.03 , df 1, p= 0.0000
What apparently is happening (plotting the curve of patients above or below the median fvc), is that survival in patients with a better FVC begins to decrease with a delay of about two years compared with those with poorer respiratory function, which makes sense.
For what I understand from the stata survival analysis reference manual, there are two possible (apparently equivalent) solutions:
a) use the tvc and tvexp options, that is:
stcox fvc, tvc(fvc) tvexp(_t>=2)
b) stsplit the data at time 2 and build an interaction variable with time:
stsplit twoyears, at(2)
gen fvc2=fvc*(twoyears==2)
stcox fvc fvc2
I did try both solutions, and they give very similar but slightly different solutions:
solution a gives:
main HR .9502671 (95% CI .939542 .9611146)
tvc HR 1.008867 (1.004696 1.013055)
while solution b:
-------------+----------------------------------------------------------------
fvc HR .9590344 ( .9508496 .9672896)
fvc2 HR 1.020984 ( 1.009306 1.032797)
Reassuringly, this solution made estat phtest, detail happy:
fvc rho 0.05118, chi2 1.29, df 1, p= 0.2566
fvc2 rho -0.02088, chi2 0.20, df 1, p= 0.6525
Global test chi2 1.64, df 2, p= 0.4409
my questions are:
a) Am I correct?
b) Should I care for the very slight difference?
c) what should I do with the coefficient of the interaction variable?
thanks!
Related Posts with dealing with a time varying variable in stcox
How can I use Stata to generate 50 consecutive strings like star1 star2 star3 star4 star5........star50?As the title suggested, I know how to use R to generate them. However, I don't know how to do that i…
choosing the correct model estimationgood evening everyone i have a big problem with my database already i was focused on the gmm estimat…
ACTEST Error: "struct ms_vcvorthog undefined"Hi folks, I am re-running some ITSA script from a couple of months ago with some updated data and ha…
Merging two datasets based on a date rangeHi, I am a STATA newbie and got somehow stuck merging two datasets. One dataset (A) contains, amo…
import all excel sheets from a specified folder, and save as STATA filesHello - I am attempting to import all excel sheets from a specified folder, and save as STATA files.…
Subscribe to:
Post Comments (Atom)
0 Response to dealing with a time varying variable in stcox
Post a Comment