I have a longitudinal medical record dataset. My cohort is made up of patients with a particular disease. There are no members of this cohort without this disease. Disease indications are denoted by a recorded date and medical code. Simply put, an individual under significant disease burden will have a greater number of disease events OR a greater number of repeated drug prescriptions compared to a patient presenting intermittently.
A particular drug will be given to patients to correct for a particular disease burden e.g., patients suffering chronic migraines will be prescribed triptans or topiramate. However, patients having infrequent migraines maybe given NSAIDs. This is clearly seen in the dataset.
Now, the issue I face: Using recurrent Cox regression (PWP-Gap time) with a drug prescription as a covariate, drugs for patients with extreme migraine burden will appear inefficient (migraine risk 1.3). Unlike, in scenarios where I have tested NSAIDs drugs and found them to be more efficient (migraine risk 0.8).
Yet, in reality, the drug for patients with extreme migraine burden are 1) only given to extreme cases, 2) are doing a good job despite how the patient might be presenting so the result of the recurrent cox regression should, in fact, be showing a reduction in migraine risk.
How can I correct for these two extremes when comparing the outcome from recurrent cox regression?
Having been told that the issue I face is "confounding by indication" I am now presented with a study design issue. A snippet from a BMJ article states:
An alternative approach would be to include only those subjects who are similar for all prognostic factors (such as a history of disease or presence of other risk factors) except treatment. https://www.bmj.com/content/315/7116/1151.full
Firstly, my entire cohort is made up of migraine patients. If I am looking at migraine treatment, then surely every individual who is similar in migraine severity to those on the drug exposure of interest, will be on that drug! This can only not be the case if the doctor the patient visits do not know how to treat the migraines.