So, we'll pick up where we left off before and actually put in numbers to replace the Beta hats in the generic representation of our interaction model that related the log odds of obesity to HDL measured continuously and to age put into quartiles. So, there were four categories with three indicators, and then the interaction between HDL and age, which require three interaction terms. So now we'll parse this actually using the numerical results that I got by running this on the computer. So here are the numbers that come into play when I fit this in a computer. So again, it looks complicated but with a little bit of effort, you can parse the results. So, this is what we call Beta one hat before for example, and this is what we call Beta two hat, four etc. So, if you were to write this out and replace with numbers what we had done before, what you get is the slope of HDL for the age quartile one group is simply just that Beta one hat negative 0.056. That would be the log odds ratio of obesity for two groups who differ by one unit in HDL, one milligram per deciliter, and are in the youngest age quartile. So, this could be exponentiated to get the odds ratio for this group, odds ratio associated with HDL. If we did this for age quartile two, we have to bring in a little bit more, and I won't rego through the math here. I'll just replace the Beta representation with the numbers, but you may recall we had to add something to that initial association for the age quartile one between obesity and HDL to get that association for age quartile two. So we add that coefficient of that interaction term for age quartile two in HDL. When the dust settles the log odds ratio estimate the slope is negative 0.039, this could be exponentiated to get the odds ratio. Similarly for age quartile three, we follow through on what we did but with numbers, and we get a log odds ratio of obesity per one unit difference in HDL of negative 0.031 after doing the addition for persons in age quartile three. I'll let you do it for age quartile four on your own. Here's what we look like slope wise. This is a messy graph, but I'm just comparing and contrasting what these estimates look like on the log odd scale compared to when we had the unadjusted and the adjusted. Now, we're allowing the slopes to differ by age group and at least visually they do, whereas with the blue lines when we just simply adjusted for age differences, we were estimating one overall relationship between obesity and HDL in each of the four age groups after adjusting for overall age differences with this interaction model, we're allowing those associations to depend or differ on age, and we get these slopes that are not parallel. Certainly, we could write this up and put it in the regression table in an article but that may be unfair to the readers. It's not incumbent on the readers to have to parse models on their own and do exponentiation and add things together etc. So it will be much more useful to present rows in this manner here, where I would actually put the results from the model. So, this should really not say unadjusted this should just be, I'll just call it model. I for interaction because we shouldn't be unadjusted because the model included both of these things. But, what I would show here is for the HDL association between obesity HDL, I will show the separate odds ratios resulting from those four separate slope estimates. Using the computer, I can get the confidence intervals, so I could show separately for each of the four age quartiles what the odds ratio of obesity per unit increase in HDL was, put the confidence intervals, and then I could show the exponentiate odds, which would be the baseline odds for each of those four age groups. What I mean by baseline odds, if we go back to this picture here, you can see all these pictures start at different points, all these lines start at different points and that's where the starting odds in the lowest HDL value actually technically when HDL is zero. So, you could extend this back to zero, that's what that point is, but then we would use that to inform us about differences between any of the age groups for different levels of HDL. It would involve that starting odds piece by age group, and then the interaction terms again. So, again, interaction is a two-way street. So, what you can see here is that when these lines are not parallel, the differences between the four age groups differ depending on the HDL level, and you could present the results in that direction as well. So, again, we could also show that there's a formal test for whether any of those three interaction terms taken together whether all three of them are zero. That's a formal test of whether there is effect modification are not statistically speaking. So that's not x is the null would be m, sorry. That the slopes of those interaction terms are zero and taken together and the p-value is less than 0.01. So, statistically speaking, we have effect modification here, and if that was our decision rubric for including things in the model, it would be one present not just one overall age adjusted association between obesity and HDL but these age specific ones. We could extend this model to include adjustment variables as well, but it would be messier to write out on the slide so that's why I limited to these two, but the principle is exactly the same. Let's look at predictors of breastfeeding Nepalese children as well. Let's see if there's any differences in the relationship between breastfeeding and age by sex. So, let's just look at the adjustment model for model three, and look at what the results say about the relationship between breastfeeding and age. I'm only going to focus on the pieces that have to do with sex and age, but there was also the maternal parity and the maternal age part. The slope of age here estimates the relationship between breastfeeding and age adjusted for sex, maternal parity and maternal age. So based on this result, here are the adjusted odds ratio is 95 percent confidence intervals, and this already appeared in the table I showed you, of being breast fed for two groups of children who differ by one month in age but are the same maternal parity and maternal age. So, it's the same for both sexes because once we adjust for the sex differences and maternal parity and age, the relationship between breastfeeding and child's age is the same for both sexes. It's either negative 0.25 or odds ratio 0.78. So, then this adjustment odd after adjusting for sex differences, we estimate one overall association between breastfeeding and age. If we wanted to actually see whether there's evidence the relationship between breastfeeding and age differs by sex, we could include in this model an interaction term between age and sex plus. I'm not showing the other pieces, but they'll be estimating slopes for maternal parity categories and maternal age. So, when we get here when we do this, this is the initial slope for sex 2.5, the slope for age a negative 0.21, and a slope for interaction term, which is x_1 times x_2, x_3 is equal to the interaction term. X_1 sex times age, x_2 is negative 0.09. If we were to do this based on this result, here are the adjusted odds ratios and 95 percent confidence intervals of being breastfed. I got the confidence intervals from the computer. You could parse this model and get the same adjusted odds ratios if you want to sit down and do that. The slope for males of age for males turns out to be just the original slope for age negative 0.21, exponentiate and that gives an adjusted odds ratio of 0.81 for two groups who differ by one month and age and are males. So, 19 percent reduction per month of age in the odds to be breastfeeding among the males. For females, the slope when all the dust settles is the slope for males of negative 0.21 plus the slope for the interaction piece between age and sex. It turns out to be a slope of negative 0.3. If we exponentiate that, we get a lower odds ratio for females indicating a greater drop in odds per month of age, but when all the dust settles, these confidence intervals overlap and the resulting p-value for testing this interaction is greater than 0.05. So, not conclusive evidence of a difference in the association between breastfeeding age between males and females after accounting for maternal parity and maternal age. So again, effect modification of an outcome exposure or exposures relationship can be investigated via logistic regression in two ways. The data can be split into separate subsets based on the levels of a potential effect modifier, and separate outcome/ exposure regressions can be run on each subset. Or the resulting slopes, a 95 percent confidence intervals for each predictor or the exponentiated versions on the odds ratio scale can be compared across the models. That's what we looked at with that first example relating suicide outcomes to self-identified sexual identity. Another thing that can be done is creating an interaction term, and we showed examples of this both in linear regression and now in logistic.