I'm working on a medical problem, where I want to analyze the effect of taking cholesterol medications on the occurrence of heart attack. Once a medication with a specific dosage is prescribed, it'll be used by a patient for $k$ consecutive periods (i.e., refills periods).
Moreover, I have a retrospective data of several patients, where each patient
- is prescribed with different dosages,
- has the fixed $k$ periods of refill,
- may have some instances of heart attack during those $k$ periods, and
- has other risk factors (as confounding factors).
Now, if a patient takes a specific dosage of that medication for $k$ consecutive periods (in a prospective sense), how can I predict the risk of heart attack at any time during those $k$ periods? I guess there might be some relevance to Cox survival analysis, but I'm not quite sure. So, any comment/help is really appreciated!