2
$\begingroup$

I am performing a survival analysis on medical registry data and would like to model drug exposure to estimate a continuous dose-response curve. I have drug data like this:

enter image description here

where ATC is the unqiue code of the drug, and DDD_pack is the number of days the pack of medication will cover assuming the person is taking the standard dose for that particular drug. Actual dose is unknown.

I'm having problems deciding the best way to construct the exposure variable for the dose response. My initial thoughts are to somehow include DDD pack as a time varying variable in a Cox model. However, I am unsure of how to decide on the time step / interval periods. For example, I could consider interval periods of length 90 days and compute the total DDD out of those 90 days as a proportion. Or I could chose 180 day intervals, or shorter ones. Is there a way to decide? There is also the problem that some people may actually be on a smaller or larger dose than the "standard" and hence the "real" DDD_pack might be somewhat less than or larger than the estimated values in the table. I thought perhaps of looking for patterns in the date dispensed column but it then got confusing since some people might be taking several drugs at once. I would very much appreciate some advice for my analysis, in particlar how to chose the interval / period length for constructing the time depednant variable (drug exposure) for the Cox model.

$\endgroup$

2 Answers 2

2
$\begingroup$

For a Cox model, the statistical principle to keep in mind is how the model incorporates covariate values. At each event time, the model examines the covariate values in place at that event time for the individual with the event against the values at that event time for all individuals still at risk. There is no incorporation of prior exposure history into the model unless you construct a predictor that includes a measure of exposure history. The way you are thinking about the association of the drug with outcome thus determines how to present the drug information to the software. You have to make sure that the software knows, for all event times, your intended measure of drug exposure for all those still at risk. That determines how you need to structure your data set.

So the big question is what your intended measure of drug exposure should be. As you can't know whether the participants actually took the drug as prescribed, you will probably have to assume that all the prescribed drug was taken except for time periods that end in death or other terminal event. The case of id 659 that you show suggests that the net dose per day could be less than prescribed, as packs providing 33.3 or 16.7 days of drug lasted much longer than those periods, based on the intervals between refills. Should you divide the DDD_pack value by the number of days until the next refill, at least for time intervals that don't end in death? What's the best way to estimate drug exposure for time periods that end in death? That choice will be vey important and runs a risk of substantial bias if you just divide the last DDD_pack value by the number of days until death. Should there be some smoother average of drug exposure, or some measure of cumulative exposure?

Those considerations aren't strictly statistical. They need to be based on understanding of the subject matter. Discuss these issues with colleagues who are familiar with the details of the data and the underlying biomedical question you are addressing. Once you decide on a measure of estimated drug exposure that makes sense on that basis, then make sure that the values of your measure are available to the software, at each event time in the data set, for all individuals still at risk at that event time. That's typically done by the startTime, stopTime, event structure in the counting-process data format.

$\endgroup$
16
  • $\begingroup$ Thank you so much @EdM! Based on this, I was thinking to divide DDD_pack by days between intervals to estimate DDD EACH day so as to construct the time varying variable on daily timesteps. When the time interval between refills is above a threshold (intimating patient likely stopped taking drug), maybe just assume DDD = 1 for the number of days indicated in the DDD_pack? $\endgroup$
    – user167591
    Feb 5, 2023 at 11:01
  • 1
    $\begingroup$ @user167591 at each event time the modeling compares the covariate values of the case with the event against the values for all those at risk at that time. So you need to have correct time-specific covariate values for each individual at each event time among the entire data sample up through that individual's own event (or censoring) time. That argues against your suggested summed up final drug exposure as a time-fixed covariate. That single summing up also poses a big risk of survivorship bias. $\endgroup$
    – EdM
    Mar 5, 2023 at 16:31
  • 1
    $\begingroup$ @user167591 Any fixed-in-time covariate should have a value that was in place at time=0 in the survival analysis. Chemotherapy and radiation cumulative doses might be OK, depending on the details. A problem is that, even if you set time=0 to be after the chemo/radiation therapy, someone who is sicker might have not received all of the intended doses. Thus there would be a risk that a low cumulative dose seems to be associated with worse outcome just because those who received low doses were sicker to start with. There are ways to try to handle that, but much care is required. $\endgroup$
    – EdM
    Mar 5, 2023 at 21:40
  • 1
    $\begingroup$ @user167591 I'm not familiar with that function or package. This might be more an issue of subject-matter knowledge: what transformation of prior drug-exposure values, for a particular drug, would a subject-matter expert expect to be related to the current risk of an event? That could vary from drug to drug, depending on the drug's time course of action. $\endgroup$
    – EdM
    Sep 11, 2023 at 13:47
  • 1
    $\begingroup$ @user167591 that leads, at best, to problems with left truncation. That doesn't deal with how to evaluate the pattern(s) of past drug exposure that affects current event risk. At first thought, that seems like it might also lead to survivorship bias. Work with people who understand the drugs in question to figure out the best way to include drug-exposure history for each drug. Consider the approach in the other answer; I'm not familiar with it but it seems promising for this type of work. $\endgroup$
    – EdM
    Sep 13, 2023 at 13:15
2
$\begingroup$

I agree with @Edm answer, but I want to add something as I worked on a similar dataset some years ago. The first approach is naturally to investigate your outcome (which, if I am not wrong, you don't report in your question) using the full exposure history and investigate complex temporal dependencies trying different exposure definitions, temporal windows and lags.

Nonetheless, there is a different approach that might be useful and complementary to the former. This is by using sequence mining and that can be used to have a look at patterns of prescriptions as a whole. Let's say your exposure to a medication can defined as a categorical time-varying variable (e.g. binary: 1=presence, o=absence) across a daily timescale or whatever timescale you eventually decide to define. Imagine that, for each subject you then define a sequence of days coded as 0 or 1 (in the binary case). This represents the entire exposure history of the subjects. With it you can explore patterns sequences within and between individuals using sequence mining tools that are already developed for other research areas such as genomics. You can compute distances among sequences, explore the most recurring patterns, cluster and so on. It also carries interesting visualizations tools! I am claiming that this approach does miracles, but it's a nice complementary way to describe and investigate this complex categorical time-series.

I wrote a small paper on the topics called "Use of State Sequence Analysis in Pharmacoepidemiology: A Tutorial", which is a very very simple intro to it (it was my undergrad thesis after all), but includes a lot of references to other works (very recommended). I also found a more detailed introduction in a recent pre-print ("Mining and evaluation of patients' diagnostic therapeutic paths through state sequences analysis") that came out in the end of last year. In any case, the most straightforward implementation of this method uses the R package TraMineR and, once you get the hang of it, it is much simpler than any time-varying survival/case-control analysis you are planning to work on. Just be mindful the list of publications on the package website it's not very updated.

Regarding your idea of using dlnm I recommend this example of code (on Git Hub 2014_gasparrini_StatMed_Rcodedata) the author of dlnm package ( Gasparrini A.) used to carry out the analyses for the paper "Modeling exposure–lag–response associations with distributed lag non-linear models". If you delve into the functions he created and used to define asbestos exposure, you might find some helpful stuff!

$\endgroup$
1
  • $\begingroup$ Thankyou very much @jmarkov. I wasnt aware of this...it looks interesting. $\endgroup$
    – user167591
    Mar 4, 2023 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.