0
$\begingroup$

I have a large medical retrospective longitudinal dataset of electronic health records. An individual is identified by an ID. A medical event or drug prescription event is identified using a code and a date.

Every patient has a migraine. I am looking at assessing the efficacy of current migraine medication (preventatives e.g., topiramate). I have a number of recurrent Cox regression models I will eventually turn to, until then, I am just assessing the trajectory of a patient's migraine history before and after they a prescribed the drug of interest. This is quite messy, as patient records aren't the same length and drugs are not prescribed at the same time, nor is drug prescription persistent or regular.

I took all patients with the drug and I divided that cohort into a before drug cohort and after drug cohort. I would expect to see the migraine burden increase prior to drug exposure, after which there should either be a decrease in migraine frequency (fewer reports of migraines) or a regular pattern of migraine diagnosis (it is not getting any worse, but it isn't getting any better).

The following is a quick MCF (Nelson-Aalen) plot. enter image description here

The before (red) is definitely showing an increase in headache burden as the population approaches their first drug exposure. Now whether the after (blue) is linear, in that there is no curve to the slope, I'm not sure.

My questions: 1) is this an appropriate quantitative measure of whether a drug halts the increase in migraine progression (keyword being increase)? 2) Would a calculation of the curve off a straight line make any sense if there is an error? 3) Is there a linear model approach I could use instead?

Edit: The complete electronic healthcare record is approximately 580,000 patients. Of those, 10,000 are taking the drug of interest.

Every medical record begins from 01/01/2000 and will continue until the patient has either died, left the clinic (but there is no indication, just a lack of record) or, in most cases, the record continues to 01/01/2016.

Each patient is unique, exposure to the drug won't be happening at the same time. Neither will the follow up time from initial drug exposure. Drug dosage is not recorded, only the drug ID and the date of prescription and repeat prescription. Patients can come off drugs at any time.

Migraines are tracked by their dd/mm/yyyy event record in the patient record. Although, in the MCF above they have been binned into weeks.

An increase in migraine burden is measured as a decrease in time between migraine recorded events (dates). I think it's important to remember that this is real-world clinical data, totally uncontrolled and very messy.

$\endgroup$
  • 1
    $\begingroup$ Hi Isabella, these are electronic health care records, so making controlled observations is extremely difficult. I'll adjust the original question given your feedback. $\endgroup$ – Anthony Nash Jan 6 at 22:12
  • 1
    $\begingroup$ Thanks, Anthony! Very helpful clarifications. Can you count the number of migraines before and after the first drug prescription and model that as a function of time (before/after) with duration of follow-up as an offset and patient as a random effect via a Poisson mixed effects model? This will allow you to compare the mean number of migraines per day of follow-up before and after the first prescription for the typical patient. It's a bit tricky to define follow-up for patients with just a prescription, so I wonder if you could derive that by assuming a typical dose and prescription duration. $\endgroup$ – Isabella Ghement Jan 6 at 23:20
  • 1
    $\begingroup$ If you wanted to factor in all prescriptions of the same drug for a given patients, can you do the same as suggested in my previous comment but also include the number of prescriptions as a covariate in the model? In particular, count the number of migraines after the first prescription for each patient until you can assume the last prescription they received would have ended and define the offset accordingly. Again, you will neee to make some assumptions about typical dose and corresponding prescription duration to determine when the last prescription would have ended. $\endgroup$ – Isabella Ghement Jan 6 at 23:24
  • 1
    $\begingroup$ I was going to suggest the use of the GLMMadaptive package: cran.r-project.org/web/packages/GLMMadaptive/vignettes/… as it can also compute marginal coefficients (rdrr.io/cran/GLMMadaptive/man/marginal_coefs.html). $\endgroup$ – Isabella Ghement Jan 7 at 16:27
  • 1
    $\begingroup$ Can you not use Quasi-Poisson mixed effects modelling then to account for over-dispersion induced by non-independent events? According to slideplayer.com/slide/10412973, you might also need to worry about 'contagion' (e.g., one migraine increases the probability of next migraine for the same patient), which can also induce over-dispersion and can be handled by Quasi-Poisson mixed effects modelling. Interesting problem! $\endgroup$ – Isabella Ghement Jan 7 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.