Hi all,
I am studying the effect of a medication (beta-blockers dispensed after the diagnosis of cancer) on a cancer outcome (e..g. breast cancer death and breast cancer recurrence). We have modeled medication use as a time-varying covariate, meaning that user time on the drug begins accumulating from the first medication dispensing, and carries on until the end of follow-up. In my models, I also have variables ascertained at baseline such as age, and I am interested in figuring out if some of these variables modify the effect of the medication. The steps for how I created my time-varying medication variables are detailed below:
1) First, I created a variable 'fbetablocker' representing the first time a beta-blocker was dispensed after diagnosis.
2) I then created a variable 'timetofbetablocker' representing the time after diag (in years) to a patient's first beta-blocker.
3) stset the data.
4) stsplit the data at 'timetofbetablocker'.
5) Generate an analysis variable that counts someone as a user from the first time they used a medication of interest, and a non-user before this time.
6) Run the survival command. My final time-varying variable is named 'timetofbetablockerana', so the cox models read
Now, I am essentially wondering if running interactions with this variable is a 'valid' measure of effect modification or not.
is the code I've been using ('newage' is just age categorised), and then
to test for global differences.
Another option (and one that I've run as well) is to simply create a binary variable (not time-varying) indicating whether or not someone in the study took a medication after diagnosis or not. I could then interact that variable with age.
The two methods mentioned above give different results, so there must be one that has a more sound statistical justification. I have asked several people in my supervisory team etc as well, and none seem to have much of an idea.
Any help would be much appreciated.
Thanks, Oliver
I am studying the effect of a medication (beta-blockers dispensed after the diagnosis of cancer) on a cancer outcome (e..g. breast cancer death and breast cancer recurrence). We have modeled medication use as a time-varying covariate, meaning that user time on the drug begins accumulating from the first medication dispensing, and carries on until the end of follow-up. In my models, I also have variables ascertained at baseline such as age, and I am interested in figuring out if some of these variables modify the effect of the medication. The steps for how I created my time-varying medication variables are detailed below:
1) First, I created a variable 'fbetablocker' representing the first time a beta-blocker was dispensed after diagnosis.
2) I then created a variable 'timetofbetablocker' representing the time after diag (in years) to a patient's first beta-blocker.
3) stset the data.
4) stsplit the data at 'timetofbetablocker'.
5) Generate an analysis variable that counts someone as a user from the first time they used a medication of interest, and a non-user before this time.
6) Run the survival command. My final time-varying variable is named 'timetofbetablockerana', so the cox models read
Code:
stcox timetofbetablockerana............etc
Code:
stcox timetofbetablockerana##i.newage
Code:
timetofbetablockerana#i.newage
Another option (and one that I've run as well) is to simply create a binary variable (not time-varying) indicating whether or not someone in the study took a medication after diagnosis or not. I could then interact that variable with age.
The two methods mentioned above give different results, so there must be one that has a more sound statistical justification. I have asked several people in my supervisory team etc as well, and none seem to have much of an idea.
Any help would be much appreciated.
Thanks, Oliver
Comment