I am working on a project that aims to prove receiving cardioprotective drug at the time of first dose of chemotherapy will reduce the risk of cardiovescular event among cancer patients. I used the Cox proportional hazard model since it is a time-to-event analysis.
Some patients did not receive cardioprotective drug throughout the chemo treatment period (No CardioTx Group), some patients received cardioprotective drug at the time of first dose of chemo (Early CardioTx Group), and some received cardioprotective drug after the first dose of chemotherapy (Late CardioTx Group).
Initially, I conducted a Cox model using cardiact event as outcome, and the timing of CardioTx (0=No, 1 = Early, 2=Late) as its predictor, but this is not right because Late CardioTx Group received the cardioprotective drug after baseline (first dose of chemo). I would like to treat the timing of receiving CardioTX as a time-varying covariate in Cox model instead.
We have date of first dose of chemo, and date of CardioTx in the dataset. How do I code the time-varing covariate to represent the timing of receiving CardioTX?
My initial SAS code is below:
proc phreg data = test;
model followuptime*cardiacevent(0) = CardioTx/rl;
run;
Thank you in advance!