I have a longitudinal retrospective data set of human medical records. They feature CONDITION and DRUG. There is no way of saying why a drug was prescribed other than observing the conditions/diseases present at the time.

I would like to know whether taking drug X has an outcome on a particular disease. The outcome will be the duration between repeated visits to the doctors. I have used a recurrent cox regression to classify whether a particular drug (as a covariant) is associated with a change in risk to the disease outcome.

I think I need a linear model where the predictor/independent could be time to a particular reoccurring disease record (remember, this is recurrent so a little bit like migraine so the patient sees the doctor often) and the dependent/outcome variable would be some measure of the disease outcome. If I take e.g., 1250,000 patient records, align them so that the index date is defined by the particular drug of interest, I could be able to get a before-after effect.

I would appreciate any links, papers, tutorials, on an approach similar to what I am trying to do.

Edit #1 1) The retrospective cohort is made up only from patients with a particular condition, however, e.g. migraine, it is a condition that will/can be recorded multiple times, so the duration between records is the only disease outcome to go by.

2) The drugs I am interested in are those not associated with a particular disease of interest.


1 Answer 1


Your approach is bound to show that drugs cause what they are intended to prevent. E.g. if you take patients worth ischemic heart disease, you will see that those taking a beta blocker (similarly a angiotensin converting enzyme inhibitor) have more myocardial infarctions, related hospitalizations and deaths than those not taking a drug for ischemic heart disease. This does not mean that these drugs do not work, but rather that the analysis did not fully reflect the patient state (i.e. more severe patients are more likely to be on these drugs and less severe patients off drug; this phenomenon is called "confounding by indication").

Structural equation models (similar to propensity scores, but with multiple opportunities to switch treatment) may be a good choice for your dataset. There are many good introductory books on observational/database/effectiveness studies that should get you started.

  • $\begingroup$ Thanks for that information. I've added some further notes to my original question concerning the study design. $\endgroup$ Sep 23, 2018 at 13:55
  • 1
    $\begingroup$ I don't think that changes the answer all that much, although it might be less extreme of a problem. An analysis should reflect the process of treatment assignment (here presumably doctor's decision based on doctor and patient characteristics - which would ideally be fully observed). $\endgroup$
    – Björn
    Sep 23, 2018 at 14: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.