# Comparing intervention/control group

I am planning to conduct a study which is based on an RCT design.

I am intending to conduct an intervention. During this intervention, participants and control group enter some medical data on daily base for a predefined time frame (like 6 months).

I wonder whether there is a better approach to investigate the effect of intervention besides averaging medical data per participants and doing an repeated ANOVA. I wonder about this because averaging does not really take into account whether the intervention stables good health behaviour over the time compared to control group.

Thanks a lot!

The basic model for the ANCOVA is:

$$E[Y_{t>t_0} | X, Y_{t_0}] = \alpha + \beta_1 Y_{t_0} + \beta_2 X$$

Where $$t_0$$ is the baseline and $$Y$$ is the time series of the response and $$X$$ is the indicator for receipt of intervention. The coefficient $$\beta_2$$ summarizes the average difference in change from baseline between treated and control. $$\alpha$$ is the expected change from baseline in the control group.

Of course, I've suppressed the actual expression of the error term, you can use any number of model based or robust estimates (GEE, mixed model, etc.) to handle repeated measures. The point is even if there's a time-varying trend in the post-baseline response, such as comes from a learning effect or growth effect, the hypothesis of a mean-difference-in-differences is still well motivated. In other words, rejecting the null, you can still state that participants in the intervention group on average have a greater or lesser change from baseline than those in control. This is supported both by theory (exact derivations can show hits to power but the test retains suitable power depending on the design) and by practice (guidance on estimands supports fitting the model that most closely parametrizes the quantity of interest based on initial hypotheses and settings).

However you can generalize the ANCOVA to fit any complex time-series for the mean change-from-baseline process in treated and control using splines, filters, or other. Splines would be preferable in my book because it would be quite simple to construct a hypothesis test using a likelihood ratio test. You could argue that the ANCOVA is a time series model using a "constant" for the change-from-baseline-process. This family of tests is often called "interrupted time series" but the expression of time is almost always no more complicated than a first order, i.e. linear effect. The consequent likelihood ratio test for the interaction slope and interaction intercept parameters are sensitive to detect a "jump" or "growth" effect.

• Thanks! Any recommendations for a suitable R package?
– Jens
May 21, 2022 at 21:49
• Sadly you'll need a reference on how to fit these models using any of the repeated measures packages, I think LME4 is more than capable. May 23, 2022 at 16:47
• what do you exactly mean by needing a reference? Can you elaborate further, please?
– Jens
May 25, 2022 at 11:50
• What I mean is that there is no simple R program (that I trust) into which you can just dump your data and get a result. The syntax in LME4 is tricky, and even harder in NLME. By reference I mean either a statistical primer or reviewer to help assess the model fit, adequacy, diagnostics, etc. May 25, 2022 at 16:20
• Thanks for clarifying
– Jens
May 29, 2022 at 17:44