## Effect Modification and Interactions

Fitting two regression lines, however, does not directly allow comparison of the two lines in the sense of assessing the statistical significance of the difference between the two lines. This can be approached by considering a joint model across the two groups. Introducing the random variables

X1 = Vitamin B intake (in mg)

and

X2 = { 1 if mouse is male

0 if mouse is female we can describe the situation by two separate regression models,

μ(x1,x2) = {

βA0 +βA1 x1 if x2 = 1 βB0 +βB1 x1 if x2 = 0

(∗)

with βA1 denoting the slope in male mice, and βB1 denoting the slope in female mice as the main parameter of interest. However, this description still does not have the usual form of a regression model. This can be approached by regarding X1 as actually two different covariates, one defined in the male and one defined in the female mice:

XA1 = { X1 if x2 = 1

0 if x2 = 0

XB1 = { 0 if x2 = 1

X1 if x2 = 0 We can now consider a regression model with the covariates XA1 , XB1 , and X2, which reads

μ˜(xA1 ,xB1 ,x2) = β˜0 + β˜A1 xA1 + β˜B1 xB1 + β˜2x2 . Here, β˜A1 denotes the effect of changing X1 in the male mice, and β˜B1 describes the effect of changing X1 in the female mice, and hence it is not surprising that β˜A1 = βA1 and β˜B1 = βB1 . Indeed, this model is equivalent to the “double” model (*) with the relations

β˜0 = βB0 , β˜A1 = βA1 , β˜B1 = βB1 , and β˜2 = βA0 −βB0 because in the case x2 = 0, we have

μ(x1,0) = βB0 +βB1 x1 and μ˜(xB1 ,0,0) = β˜0 + β˜B1 xB1 = β˜0 + β˜B1 x1 and in the case x2 = 1, we have

μ(x1,1) = βA0 +βA1 x1 and μ˜(0,xA1 ,1) = β˜0 + β˜A1 xA1 + β˜2 = β˜0 + β˜2 + β˜B1 x1 . Consequently, if fitting a regression model with the three covariates XA1 , XB1 , and X2 to the data of Figure 19.1, we obtain an output like

variable beta SE 95%CI p-value intercept 47.714 7.845 [25.933,69.495] 0.004 dosemale 0.589 0.158 [0.151,1.026] 0.020

dosefemale 0.143 0.158 [-0.295,0.581] 0.416 sex 2.829 11.094 [-27.974,33.631] 0.811

and we obtain βˆA1 = 0.589 and βˆB1 = 0.143 as the slope parameter estimates in males and females, respectively. To assess the degree of effect modification, we will look at the difference between the slopes, that is,

female male placebo treatment placebo treatment

number of patients 67 62 71 67 patients with decrease in BP 22 23 27 45 fraction of patients with decrease in BP 32.8% 37.1% 38% 67.2% odds = fraction/(100-fraction) .489 .59 .614 2.045 logit=log(odds) −.715 −.528 −.488 .715