Okay, in this video, we're going to introduce the idea of being able to analyze multiple factors simultaneously. Specifically in this video, we're going to begin by comparing it one factor general linear models with two factor general linear models in a very large-scale fashion. We're going to briefly discuss experimental design for a two-factor general linear model. And we're going to end by highlighting the types of questions that can be answered with a two factor general linear model. So far, we've spent a lot of time learning to analyze experiments like this, where we might have one class of manipulation that we might use in an experiment. So we might call that class and this example drug. And within this class you might have three different types of drugs. And for each of our drugs we might have, let's say, ten independent samples that we use to obtain data to represents the effects of drug a, drug B or drug C. So that's what each of these X's represent. They represent an independent data point for a particular treatment. Okay? Now I just want to introduce some new terminology. This class that I refer to is more commonly referred to as a factor. And each factor has multiple levels. So drug a, drug B, and drug C are all three different types or three different levels within the factor drug. Okay? And we've spent a lot of time learning to analyze experiments like this using a one factor general linear model. So this might be called a one factor design, but we can also loosely refer to it as a one way ANOVA. And I want you to imagine that we weren't just interested in knowing about differences between drugs, but we're also interested in knowing about how the concentration of those drugs affects how they work. In that case, we have many more possible experiments to produce. And we might be asking ourselves whether or not we want to produce multiple small experiments versus one large experiments. So for example, if we did multiple small experiments, we might do one experiments, the compared drug a, low versus high concentration, again for B, similarly for C. And then we might take those data compare between a, B and C at low concentration and between a, B, and C at high concentration. The problem with that approach is that we would be using many different tests. And the more tests we do, the more opportunity there is to increase r, the probability of getting a false positive. We'd be increasing our type one error rate as well, which eat with each of those smaller tests, we wouldn't be making full use of all of our data. And so that approach might not be the most powerful approach that we could take. So we can view this experiment. I just want to take a step back and say, we can view this overall scenario from two perspectives. Ok? And in both cases we would be imagine that we're doing one large experiment. So we could do one large experiment from this perspective, where we treat each of our different combinations of drug type and concentration. We can take each of those combinations and consider them to be a different level within a single factor that we might call treatment. And in this case, we would have just five independent data points, 12345, within each of our levels of our Factor treatment. Okay? So that's one perspective. We could analyze this one large experiment from the perspective of a one factor general linear model. The second perspective on this experiment would involve rearranging our data to look like this. Where we can basically arrange our data in a way that is now two-dimensional. Along one dimension, we have this effective drug. And along another dimension we have the effective concentration. And now each of our x's there still independent data points. But now we have a sample size of five for each treatment combination of a particular, a particular level of concentration in particular level of drug. So that's what a make the terminology clear here. From this perspective, we have two different factors. Drug is one factor, it, it has three levels. Drug a, drug B, drug C, and concentration is a second factor with two levels, low and high. Okay? So from this perspective, we could imagine analyzing these data from a, using what's called a two factor general linear model, because we now have two different factors here and now in our analysis as opposed to one. I want you to notice that when we're doing this, we have what's called a fully crossed design, which means that we have every single combination of our two different factors. So let's now take a step back and compare our one-factor perspective with our two factor perspective. Which approach is better? I would argue that there's lots of things to consider, but including power and whatnot are probably the most important thing to consider is the biological question that you aim to answer. It could be that your biological question could be best answered with the one factor approach. But I see that really hesitantly because to be honest, I've, I've added this comments down here at the bottom. I find it really hard to imagine a situation where we would create an experiment or design an experiment that could be analyzed with the two factor ANOVA or start with it. That could be analyzed with a two factor general linear model. But then where we would specifically choose to analyze it using a one factor general linear model approach. So I'm being a bit hypothetical here when I say that the best approach depends on the question you aim to answer in your experiment. I do think that that statement is true. I do think that in general we should always be choosing an approach that best allows us to answer the question of our experiment. In some cases, this might be appropriate to just thinking about this now, just kind of on the fly. This might be appropriate if for example, we really were most interested in comparing all of these bottom five treatments against this top treatment of drug a and a low concentration. If those are the only kinds of insights we wanted to make, then maybe it would make sense to analyze these data for one factor perspective. But in most cases that we would generate an experiment with this particular design. I would imagine that it would make most sense to analyze these data using a two factor ANOVA. Okay, sorry to factor general linear model, old habits. Ok, so I said on the previous slide that we should choose our approach based on the kinds of questions that we want to be able to answer. So what kinds of questions can this perspective address? Well, for experimental design like this, there are three main types of questions that could be answered with a two-factor general linear model of data like these. The first is we can ask whether or not there is generally an effective drug. So we can ask, does or does drug a differ from drug B, drug C with this, using the same kind of logic as we would with a one factor general linear model. Similarly, we can compare the the effect of concentration. So we can compare that general phenotype are measuring when the concentration is low versus when the concentration is high. So that's a second kind of question, two factors, two questions. There's a third type of question, which is that we can ask whether or not the effect of one of our factors depends on the particular level that we're considering for the other factor. So for example, we could ask. Whether or not the effect of concentration depends on the particular drug that we're, that we're considering. So perhaps for some underlying biological reasons, we might expect that Drug a might have very similar effects for low versus high concentrations. I don't know what kind of drug that would be ambient hypothetical. But perhaps biology would lead us to have that hypothesis. Whereas we might expect that because the underlying biology concentration would have a big effect for drugs B and C. If that were the case. If that were the case, that concentration had a big effect on drugs b and c, but not for a. And that kind of effect could be revealed by looking for what's called an interaction. Ok? So two factor generally your models I think are particularly beautiful because they allow us to look for this context dependence in our data. They allow us to ask whether or not the effect of one of our treatments are one of our factors. I mean, depends on the situation that we're in with. The other factor. Ok? And we expect this kind of situation to arise a lot in biology, for example, it's really well known that drugs that are produced tend to have different effects in females versus males. It's well known that for many drugs, for example, females can express more side effects than males do. If you were to analyze data like those, then with a two factor general linear model, then we would expect there to be a significant interaction for those particular data. And evolutionary biology, we know that it's very common for genes have different effects depending on their context. So for example, a gene that causes you to have high fitness in one environment might leads to you're having low fitness and another environments. And it's that kind of effect that leads to what's called local adaptation or the can lead to local adaptation. The point is that these interactions, I would argue, are a very common aspect of biology and we need a tool to be able to look for that. We need a tool to be able to understand the context of any biological factor that we're investigating. And 2-factor general linear models are an excellent tool to do that. So to sum up, I just want to give some take-home messages. There are a lot of similarities between one factor and what I'm coin multifactor analysis. I've been talking about two-factor general linear models. But the fact is that in principle, we could have as many factors as you want. Make it have three factors, four factors, five factors. It can have as many factors as you want to add. Everything that I've said so far would still apply. The only problem is that the more factors you have, the more difficult it is to analyze to interpret your data. Sorry, distracted myself a bit there. Let's, let's step back. So there are lot of similarities between one faction general linear models and two factor or multifactor general linear models. More generally. What you're going to see when we do our analyses is that the approach to analyzing one factor versus two factor analyses are very similar. In fact, the assumptions are identical and the ways in which we check them are identical. And the vast majority the functions that we use in our are identical. Okay? So if you are comfortable with one factor general linear models, then you are very well placed. To take this next step. To think about two-factor general linear models. There are a number of things that are different. And it's those differences are going to be highlighting in the upcoming videos. The first is that when we have multiple factors, so like a two-factor Joan Moore model, then we can have additional ways of calculating p-values or to calculate what's called our sum squares. And we're going to introduce a new command called ANOVA, but specifically with a capital a. In order to do this, we're not going to go into these different ways of calculating sums of squares in much detail in this series of videos. But I am going to produce a video that will deal with this in the future. The second thing that's different is to understand interactions which I've already introduced, ok. And the third thing is that after we've gotten our initial results. So after we've gotten our sense of whether or not there is general interactions occurring or whether or not there are general effects of our main factors. Are post hoc tests. Can provide as there can be many, many possibilities for our post-hoc tests. Many more possibilities than we would expect to have for single factor general linear model. And so I'm going to say that because of that, we need to apply a bit more thinking without post-hoc analyses. My wood with general linear models and we're going to go through, sorry, we need to apply more thinking for two factor gel with the general linear model post hoc tests. Then we would for one factor, general linear model post-hoc tests. And so we're going to go through a series of examples in order to familiarize you with a number of different cases you might expect to encounter. And on that note, I'll say, I hope this video has been a useful introduction. And thank you very much.