I have data from an intervention study (10 clinics, 5 control, 5 treatment). The outcome is counts, and we have monthly data at baseline, treatment active phase, and post treatment phase. The number of months in each of these longitudinal phases differers between clinics, e.g. clinic A might have 2 months baseline, 12 months treatment active, and 3 months post (treatment stopped). Clinic B might have 1 month baseline, 15 months treatment active and 4 months post (treatment stopped). Whats more, the study start date differs between clinics. However there are matched pairs (each pair has a control and a treatment clinic) which do have the same start date and number of months in each longitudinal phase.
The aim is to quantify the effect of treatment which could be done with a simple pre post type analysis using a model appropriate for counts e.g. Poisson regression. However, to maximise information available, I was thinking to somehow include time in the model. Im really not sure how to approach this but here I have some thoughts...
The model would be something like (pseudo-code):
count ~ log(exposure) + treatment + phase + rcs(time) + other covariates, family = Poisson,...
Where treatment is categorical (no (control) vs yes), phase is categorical (baseline, active, or post), time is some kind of relative time e.g. time since start active phase in months modeled using a restricted cubic spline (rcs). Baseline can be negative e.g. time = -2 months would imply the second to last month before active phase. Accounting for multiple measures per subject might be done using a random effect term or cluster robust standard errors. One problem I forsee is that because there is a time ordering of the phases, this might be highly correlated with the spline term for time. I would really appreciate some advice on my idea or alternative "better" approaches.
Update
The outcome is the number of patients which have taken up (i.e. "uptake") a particular health intervention. Shown below are total counts, but we also have these separately for men and women. We also have total number of patients as well as total visits. I had thought of using the number of visits as an offset term in the model.
The same subjects can be appear in several months since they may visit the health center many times. However, once a particular subject is recorded to have a clinical intervention in a particular month, that subject is removed from the risk set and so does not appear in subsequent months.
The main interest is post intervention, but it seems wasteful to me to ignore the intervention phase itself since we have the data. I also think that this will assist in modeling the trajectory of the uptake over time.
Below is a plot of counts over time for the 10 centers (rows). The matched pair centers as mentioned above are: 1 & 2; 3 & 4; 5 & 6; 7 & 8; and 9 & 10