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.
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.
Thanks