Okay, in this video, we're going to talk about how to interpret the coefficients that we obtain. When we look at a summary of the output of a linear model with two factors. That's quite a mouthful. This is a directs, this video is a direct continuation from the previous video, where I walked through an analysis of simulated data in order to highlight a number of the things we should watch out for. Whether we want to look for when we're analyzing a two-factor general linear model. This is, I've highlighted the model that we were most interested in. If you've not seen that previous video, then I'll just walk you through what we have here. Our model involves looking at a response value or a dependent variable which you've called y. And two different treatments. We have treatment sex, which has two levels as females and males. And treatment which also has two levels, either drug or control. And then we also include an interaction. We saved the output of this model in this objects which we call EEG dot lm, thought to. What we didn't do in the previous video is we didn't run the Summary command to look at the summary of the output of this model. That's something that we would normally do. I left that out because I really wanted to focus in a previous video on interpreting what interactions were. So in this video, we're going to deal with understanding with the coefficients mean. So we can get, we can look at a summary of our linear model by saying summary. And then we provide the object that contains the output from our linear model, which was EEG dot lm dawns to. And here we go. Here is our output. This output should look very familiar if you have already learned about one fact, agenda linear models. The underlying premise here is exactly the same as we saw it with one fact, Eugen linear models. There's just a few other things to consider when we have more factors in our model. We're going to focus on understanding these terms here and the estimate column or estimate column. These are our coefficients. Let's just bring that back down because we're gonna do some writing up in this top panel later. So let's focus on this output. Just like in a one-factor general linear model. When you have a two factor general linear model, the linear model function, it will choose one of your treatment combinations as a reference level. And it chooses that combination alpha numerically, just like it did when we're looking at one factor general linear models. In this case, however, the alphanumeric or the treatment which comes first, alpha numerically is determined by two different factors, not just one. We're going to walk through two different ways of thinking about or figuring out what's the intercept is in this case. The first is just to think through the alphanumeric ourselves. So we had a, one of our factors called treatment, which had either control or drug. And control comes before drug in the alphabet. So we can expect our intercepts then to include information about the control treatment. And then for our other factor, we had females and males and females come before males in the alphabet. So we would expect to the intercept to include information about females. Overall, that implies that the linear model function has chosen the combination of females in the control treatment as our reference value. What that means is that this estimate here equals the mean value of the data in the female control combination. Okay? The rest of these data are, the rest of these coefficients refer to differences between particular aspects of the model. And this reference group. Just like we saw with when we're interpreting the output in a one-factor general linear model. You're going to see though was we walk through this, that there's a little bit more to consider when we have a two factor model. Just a little bit more. Ok? To understand this output, we're going to focus on just trying to reconstruct the mean values of each of our four different treatment combinations. We've already figured out their intercept is this value. The estimate for intercept is equal to the mean value of the females, the control group. So let's hear, just write females. Control not equals this value here. Okay? Let's move down now and look at the next coefficient. Our next coefficient here is labeled sex male. What that implies is that this estimate here tells us the difference between males or tells us the impact of considering males. How do I say this? I say this by saying first, remember the intercept considers the situation where we have females in the control group. That is what this mean here represents. This is the mean for females. And the control group. This term here tells us how we can modify, or it tells us the difference between this top situation and what's given in the second line. Okay? Here, it's saying this is the difference, this estimate of minus 9.9 when we now consider males compared to the intercept. So synset since the inter ceteris considering females in the control group. And the second line tells us about what we have to do. A we consider males. This second line tells us the difference between males in the control group versus females in the control group. We know that we're still on the same control group because we have not made any changes. We have not made any accommodations to switch from one treatment type to another. Okay? So this estimate here represents the difference between males in the control group versus females and the control group. Ok, that's what this estimate here gives us. It gives us the difference between males and the control group and females in the control group. So if you want to calculate the mean of the males in the control group, we can just then take this original value for our intercept. And then we add to that the difference between a value for females and the value that we have for males. And I will just run that code that I've highlighted. And that gives us this term of 10.4 for this then is equal to the mean value of males in the control group. Now let's consider females in the drug group. To get it that we need to look at this third line. Okay? Again, remember our intercept is for females in the control group. This line here tells us the difference between the intercept and a case where we're now considering the drug group. Ok. So if you want to determine the mean values of females in the drug group, we get that by taking the value for females in the control group and just adding this term. Because this estimate here is equal to the difference between females in the control group versus females in the drug group. That's exactly the same as what we did when we're figuring out the the, the effect of being male and just stepping back to what we talked about before, when we considered this coefficient for males were saying that this is the difference between males and between males in the control group and females and the control group. So to get females in the and the drug treatment, we just take the mean for females in the control group and add to that the difference between that situation and what we get if we're considering the drug treatment. It's high like this or on that. And here is what we get. So that's going to be, I mean, values for females in the drug treatment. We now have three of our four different values. Okay? We now finally want males in the drug treatment. So far. When we've been making our changes from the intercept, which was females, the control group. We either had to make accommodations to go from females than control group two males, the control group. In which case we added this term to account for the fact that we have males or we went from females, the control group to females in the drug group, which we added. Where we added this term because this is the term that I'm tells us the difference between this. This is the term that tells us the effect of having been in the drug group compared to the situation intercept. Okay? If you want to go from females and control to males and drug, we now have to make accommodations for both changes in the sex and changes in the treatment. So to do that, we're going to take our original intercept. We're then going to add on the difference between females in the control group and males in the control group. So now we've got this give us, gives us the effect of being male in the control group. We now want to account for the fact that we're moving from control to drug by adding on that value. But then finally, we need to allow for the fact that females and males do not necessarily have, that females and males. We now have to account for the fact that we have modeled our data such that females and males can have different, can experience the effective a drug differently. And that is what is given here. This estimate here really refers to the effect of our interaction. So now if we add up all of those terms, we get this value. And that will equal our mean value for males. In the drug treatment. I did walk, go through that my mind again. Okay, so this is what we figured out for our mean values, for our various for our various treatment combinations. Let's compare. That's what we got and we looked at ES means just to make sure we've interpreted this correctly. So we said for females, the control group we had admitted 20.4. That's we get up here 20.397. We, for females, the drug group, we had an average of 50.1. That's what we got, 50.08. For males in the control group, we had 10.44, and here we have 10.4. And for males, the drug treatment, we got 19.1, which is what we got here, 19.1. So that's pretty much what I wanted to say. We've walked through how to interpret the coefficients from a general linear model that has two different factors. We've talked about how you can add up these coefficients in various ways in order to reconstruct the mean values from various groups. And we've also talked about the fact that the intercept provides an estimate for, for our reference group. I forgot to say that this p-value here, a test of whether a north of that estimate significant different from 0. And the remaining estimates just refer to differences between different combinations of treatment groups and the p-values and t values that are associated with these estimates. These tell us whether or not those particular differences are significantly different. I hope that this video has been helpful. And I'll say thank you very much.