I have a problem in which one of the covariates in my model violates the assumption of proportional hazards, but the interaction it is part of does not.
Data info:
Lifespan - mosquito time to death (not censored)
feed_time - categorical variable: AM / PM
treatment - categorical variable: infected / uninfected
clutch - continuous variable
cage - cages in which my mosquitoes are housed (i'm using cluster(cage) as mosquitoes within a cage are not independent)
Results of min model: Cox Proportional Hazards Model
cph(formula = Surv(lifespan) ~ feed_time + treatment * clutch1 +
cluster(cage), data = df, x = T, y = T)
Frequencies of Missing Values Due to Each Variable
Surv(lifespan) feed_time treatment clutch1 feed_time
2 0 0 0 0
Model Tests Discrimination
Indexes
Obs 298 LR chi2 17.47 R2 0.057
Events 298 d.f. 4 Dxy 0.133
Center -0.2016 Pr(> chi2) 0.0016 g 0.281
Score chi2 17.84 gr 1.324
Pr(> chi2) 0.0013
Coef S.E. Wald Z Pr(>|Z|)
feed_time=PM -0.3300 0.1402 -2.35 0.0185
treatment=Infected -0.2582 0.1564 -1.65 0.0988
clutch1 -0.0008 0.0017 -0.48 0.6346
treatment=Infected * clutch1 0.0073 0.0023 3.18 0.0015
Results of cox.zph:
rho chisq p
feed_time=PM 0.000771 0.000251 0.987
treatment=Infected 0.117886 4.548338 0.033
clutch1 0.072919 1.551721 0.213
treatment=Infected * clutch1 -0.066628 1.084940 0.298
So i've had a read of literature and i'm aware that in cases of violated prop hazard i can either create an interaction between the covariate and time (which wouldn't be ideal as i'm interested in the effect of Treatment) OR stratify my covariate (which i'm not sure you can do with a categorical variable? I've only seen examples with continuous variables).
However, i don't know what is appropriate to do when a covariate lies within an interaction in the same model. If someone could prod me in the right direction for what to do next that would be amazing. I've been knocking my head against this for a while.
edit: Here's the log-log plot for treatment
myfit <- npsurv(Surv(lifespan) ~ treatment, data=df)
survplot(myfit, loglog=T)