[MUSIC] Welcome back. So far, we've used regression models to identify predictors of outcomes in COPD patients and we've used a model that makes the assumption that the effect of the predictors are additive. The model is a linear combination of these predictors. But sometimes there are interaction between predictors which mean that the effect is not simply additive. In this lecture, we'll look at interactions between two binary variables. What do we mean when we say interaction? An interaction between two variables means that the effect of one variable on another is also by the presence of a third variable. In the context of linear regression, an interaction occurs when a predictive variable has a different effect on the outcome due to another predictive variable. Think of it as a third variable influencing the relationship between a predictor and an outcome. Let's have a look at the walking distance outcome again. This time, let's consider the impact that comorbidities may have on the distance walked. When you explored the data set, you would have seen there are 21 patients with diabetes, 20 with atrial fibrillation and 10 with both of these conditions. If we fit a multiple regression model on the outcome walking distance, we find that being a diabetic and having atrial fibrillation are both associated with a reduction in distance walked. Here's the regression equation written out, and we can use this to calculate the predicted mean walking distance. From this equation, you can see that when patients don't have either diabetes or atrial fibrillation, their predicted mean walking distance is 428.1 meters. This is because the last two terms in the regression model will be zero. If a patient is diabetic, the distance is predicted to be 56.2 meters less. For patients with atrial fibrillation, 120.8 meters less. For a person with both atrial fibrillation and diabetes, the assumption is that these effects are independent and additive. So the model predicts walking distance to be 286 meters if they had both conditions. But this additive assumption may not hold and the presence of both conditions may interact to have a different impact on the outcome. We can allow for this potential difference on outcome by including an interaction term in the model. We can do this by simply including an additional term, multiplying the variable diabetes by atrial fibrillation. including an interaction term in the model drastically changes the interpretation of all other regression coefficients. This is why it can be helpful to write out the regression equation in order to work out now what these mean. Before, the beta one coefficient could be interpreted as the unique effect of being diabetic. But with an interaction term included, the effect of now being diabetic depends on the effect of a third variable, atrial fibrillation. Here are the results of the regression model with an interaction tab included. You can see that the regression coefficients have changed substantially from the previous model, that's because they now represent something different. There's a significant interaction between the two comorbidities and if we write out the regression equation, you can see that the mean walking distance for diabetes patients will depend on whether or not they also have atrial fibrillation. The mean walking distance for patients without either is still 428 meters, as the last returns will be zero. For diabetic patients without atrial fibrillation, we calculate their predicted mean walking distance as 428 minus 7.7 meters. For diabetic patients that do have atrial fibrillation, if you work through the sums, you'll see that their predicted walking distance is now 218. Much lower than the 286 predicted from the model without the interaction. This suggests that having both has a more detrimental effect on distance than just the single additive effects. You now know how to explore interactions between binary variables and you'll practice this now in R. I'll see you in the next lecture where we'll look at interactions between binary and continuous variables. See you soon. [MUSIC]