I am trying to conduct a cox proportional hazard, after I checked the assumptions, it turns out that interaction exists. So, I have to put an interaction into the model. But the time varying covariate is polytomous variable with four categories. I used the below code to run analysis:
proc phreg data=one;
class treatment(ref='1');
model time*survival(0) = treatment treat_ti;
treat_ti=treatment*time;
run;
The treatment is time varying covariate with four categories. And I get the results like this:
Parameter Standard Hazard
Parameter DF Estimate Error Chi-Square Pr > ChiSq Ratio
treatment 2 1 -0.33139 0.02126 1183.5006 <.0001 0.386
treatment 3 1 -0.17445 0.02588 45.4387 <.0001 0.745
treatment 4 1 -0.69876 0.03591 278.0054 <.0001 0.646
treat_ti 1 0.01096 0.0001625 145.9549 <.0001 1.023
I am not sure if I put the interaction term wrong because the treatment is 4-category variable, but there is only one interaction term which makes the interpretation really hard. When I saw the K-M plot, only two treatments had the interaction. So my question is, did I do it correctly? If I did it correctly, how to interpret these results? Could anyone help me with it? Thank you!