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.