# Controlled interrupted time series (segmented regression) - calculating group effects separately

I have conducted a controlled interrupted time series using Linden's formulation, where

$Y_t = β_0 + β_1T + β_2X_t + β_3TX_t + β_4Z + β_5ZT + β_6ZX_t + β_7ZX_tT$

$β_0...β_3$ represent the control (untreated) group and $β_4...β_7$ represent the difference between the treatment and control groups.

From this model, is it possible to calculate the values that represent the treatment and control groups separately?

Let's assume you have two groups: Group 1 and Group 2. Then the variable Z in your model is defined as follows:

Z = 1 for Group 2  and Z = 0 for Group 1.


For example, Group 2 could be California while Group 1 could be other states, as per the example used in Figure 2 in the paper. The intervention alluded to below would be the introduction of Proposition 99.

Now, all you have to do is to set the value of Z to 0 and 1, respectively, in your model.

For Group 1, setting Z to 0 yields the following model equation:

$Y_t = β_0 + β_1T + β_2X_t + β_3TX_t$.

For Group 2, setting Z to 1 yields the following model equation (after rearranging the terms):

$Y_t = (β_0 + β_4) + (β_1 + β_5)T + (β_2 +β_6)X_t + (β_3 + β_7)TX_t$.

In the above, $β_0$ and $β_0 + β_4$ represent starting levels of the outcome variable $Y$ in Group 1 and Group 2, respectively.

$β_1$ is the slope, or trajectory of the outcome variable $Y$ in Group 1 until the introduction of the intervention. On the other hand, $β_1 + β_5$ is the slope, or trajectory of the outcome variable $Y$ in Group 2 until the introduction of the intervention.

$β_2$ represents the starting level of the outcome variable $Y$ in Group 1 at the time of introduction of the intervention and indicates whether there was a change in the level of the outcome variable $Y$ in that group immediately following the introduction of the intervention. In contrast, $β_2 + β_6$ denotes the starting level of the outcome variable $Y$ in Group 2 at the time of introduction of the intervention.

Finally, $β_3$ represents the change in slope or trajectory of the outcome variable $Y$ in Group 1 after the introduction of the intervention until the end of the study, while $β_3 + β_7$ represents the change in slope or trajectory of the outcome variable $Y$ in Group 2 after the introduction of the intervention until the end of the study.

Let $b_0$, $b_2$, $b_3$, $b_4$, $b_5$, $b_6$ and $b_7$ be the estimated values of the parameters corresponding to your model.

The estimated standard errors for $b_0$, $b_1$, $b_2$ and $b_3$ (which refer to Group 1) should be reported directly in the model summary produced by your software.

For Group_2, estimated standard errors can be derived from the estimated variance-covariance matrix $V$ of $b_0$, $b_2$, $b_3$, $b_4$, $b_5$, $b_6$ and $b_7$. The $V$ matrix should be an 8x8 matrix. On its main diagonal, $V$ will contain the estimated variances of $b_0$, $b_1$, $b_2$, $b_3$, $b_4$, $b_5$, $b_6$ and $b_7$. Off the main diagonal, $V$ will contain the estimated covariances between pairs of these items.

To compute the standard error of $b_0 + b_4$ (i.e., the intercept for Group 2), for example, recall that:

$Var(b_0 + b_4) = Var(b_0) + Var(b_4) + 2Cov(b_0, b_4)$


Estimated values of the variances and covariance on the right-hand side of the above formula can be extracted from the $V$ matrix and plugged into the formula. Taking the square root of the resulting estimated value of $Var(b_0 + b_4)$ will yield the estimated standard error of $b_0 + b_4$.

• So, it really is just a matter of simple arithmetic? e.g., the intercept for the control group (b0) + the difference between the treatment and control groups (b4) = the intercept for the treatment group – C_H May 25 '18 at 4:12
• Yes, you can just follow the arithmetic. – Isabella Ghement May 25 '18 at 14:56
• I forgot to ask - are you able to comment on how to calculate appropriate standard errors? I would like to calculate CIs – C_H May 28 '18 at 9:34
• @C_H: See the addendum to my original answer. – Isabella Ghement May 28 '18 at 13:47