Interesting confounding problem involving in what should otherwise be a pretty straightforward regression analysis:
I am interested in whether being on a drug (E=exposure) during a course of therapy prolongs the time before a patient drops out of that therapy (S=survival). However, in my observational data set, individuals may have started taking this drug at any point - including midway through a course of therapy. Given this, if I take a totally naive approach and categorize exposure as binary variable where you either took the drug during a time that overlapped with your course of therapy or you didn't, then I have a problem: even if the null hypothesis is true, and being on the drug doesn't affect how long you stay in therapy at all, then by definition those who stayed in therapy longer will have a higher chance that any E will overlap with their course of therapy, and thus those selected on the basis of such overlap will have longer therapy courses providing a false positive finding.
In contrast, if I pick a fixed window for the exposure - say, 2 months, which is roughly the average S (time someone spends in this therapy), then I fix this problem, but create a new problem: anyone who drops out early - say, at 3 weeks - and turns to this drug as their next strategy and stays on it for 6 weeks will end up labeled as having been a case where they were on the drug during therapy, which is a significant mislabeling problem.
Finally, a third option would be to go straight to quantifying exposure in a graded way (which I want to do anyways, to look for a dose-response effect), and as I do so to scale exposure by the duration of therapy - ie, E ~ mean(dose/day) evaluated over the course of therapy. This at least doesn't cause the misclassification problem - but I'm not sure it actually avoids the initial bias problem: you're still more likely to have a non-zero level of exposure if you have a long course of therapy, even if the null hypothesis is true.
Any ideas? Any tips even just on how to map this to a more traditional problem would be appreciated!