BookmarkSubscribeRSS Feed
Denali
Quartz | Level 8

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!

3 REPLIES 3
quickbluefish
Quartz | Level 8

A couple pharmacokinetics questions:

1) how long do you expect the protective effect of the cardioTx drug to last?  Only while the person is still taking it?  

2) do you expect that the drug is immediately protective or does it take some amount of time / number of doses for protection to be achieved?

 

If the drug is expected to be ~immediately protective and only protective while the person continues to take it, then really there's no difference between a person who starts it early (i.e., at the time of first chemo) or later on (prior to any CVA).  In this case, I would suggest that time starts at first dose of cardioTx and ends at first of either stoppage of that drug, however you define that, or CVA.  That's the simplest approach.  

 

Alternatively, if you think the drug is ONLY protective if it's received right at the beginning - in other words, that in order to prevent heart damage that might lead to a later cardiovascular accident, a person needs to begin the protective therapy at the same time (or before) the start of chemo - then you could run this as an intent-to-treat (ITT) study where you ignore the fact that some people start cardioTx later on.  There'd be no censoring of people who start late.  

If you really want to treat this as a time-varying covariate, where people can be on and off cardioTx at different time intervals, then you'd need to create a "counting process" data structure (or the horizontal equivalent) and use the PHREG syntax for that (you can find this by google).  In this case, a person can contribute to more than one cohort.  This is certainly doable, but results are not simple to interpret, and you will need to consider whether you're allowing the possibility of multiple CVA events per person or censoring at the first event - this will determine whether you need to use the ID statement in PHREG, I believe.

 

If you really only care about comparing people who receive cardioTx *at the time of first chemo* vs. those who do not receive treatment, then one possibility is to censor people who start off without cardioTx and then receive it later (that is, censor such people at the date they receive cardioTx).  However, that is definitely prone to introducing bias unless you have some sense that the day of starting cardioTx (relative to chemo) is random.  Have you looked at predictors of early receipt (day 0) receipt of cardioTx, i.e.:
proc logistic data=cardio descending;

model early_cardioTx = <predictors>;

run;

...where predictors might be things like demographics, socioeconomics, comorbidities, etc.

 

Another possibility (to enhance at least the first, simple or ITT approaches above) is to use inverse propensity of treatment weights (IPTW), where the weights are essentially the inverse of the probabilities that would be output (using ODS) by the logistic model above.  In fantasy-land, at least, applying these weights to people and then running one of the models above simulates a clinical trial in which you, for instance, randomized people to early cardioTx vs. not and then followed them to look for CVA.  

Denali
Quartz | Level 8

Clinicians mentioned that the cardioprotective drug  (CardioTx) is kind of similar to the scenario of prescribing hypertension medications - once the patients start receiving the medication, they will continue to receive it throughout the chemotherapy period. 

 

The advise that I received from my mentor is to treat the variable "CardioTx" as a time-varing co-variate, but I am not sure how the data should be structured/formatted and constructed the code to fit in this scenario. Do I need to create two variables to represent the two timepoints, i.e. CardioTx_early(0, 1), CardioTx_after (0,1)? 

quickbluefish
Quartz | Level 8

The way that I've usually done this is to create a "counting process" data structure, sometimes known as "long format" longitudinal data.  The idea is that there's one row per period of time during which everything is static.  In your case, since there's only one drug, this is pretty simple (this assumes you're only following people while they remain on chemo).  You start following everyone on day 0 (first dose of chemo) and endday is the day at which the status of one of the drugs (again, you only have one here - cardioTx) changes.  For patient 1 below, they're on cardioTx during the range 0-12, then stop for 3 days (>12-15), then restart until the end of follow-up: >15-48.  Patient 2 starts without cardioTx and then starts on day 20.  And so on.  Everyone has an arbitrary number of rows (some people might only have 1 row).

patientID startday endday cardioTx CVA
1 0 12 1 0
1 12 15 0 0
1 15 48 1 0
2 0 20 0 0
2 20 34 1 0
2 34 95 0 1

 

The basic PHREG syntax for counting process data looks like this:

proc phreg data=CP;
model (startday, endday) * CVA (0) = cardioTx  <other predictors> / 
  risklimits ties=efron;
run;

...where CVA is the outcome.  There's a brief explanation of this method here (but a LOT more elsewhere):

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_phreg_details12.htm

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 793 views
  • 0 likes
  • 2 in conversation