 When you compare the means of multiple groups, the most common approach is the analysis of variants. But sometimes you want to use a quantitative or continuous variable as a predictor as well. In that case, the most common choice is going to be the analysis of covariance or ANCOVA. Fortunately, this is really easy to do in Jmovi. And to demonstrate this, I'm going to use the iris data set. And what this gives is data on three species of iris flowers. Here's the sitosa and the versicolor and the virginica. And for this, it gives the length and width of the petal and the sepal, which looks like a petal, of 50 flowers of each species. And what we're going to look at is the sepal width in particular. Now, I want to start by showing you this one thing. We're going to come up here to exploration and just do the basic descriptives. And I want to take the sepal width as the variable and we'll get a density plot for this. And what you can see for this is that, well, we have this basically normal distribution. But if we split it by species, then we see some big differences. Mostly, we see that the blue density plot here at the top for a sitosa, it looks basically bigger than the green and the red ones for the other two species. And so we may want to do an analysis of variance to compare these. So the way you would do that is by simply setting up the one-way analysis of variance. But I do want to show you a complicating factor here. And that is that the sepal length is a predictor as well. And in fact, the way we're going to do that is by coming back to exploration. And if you have the scatter module installed, if you don't, you install it by going to the plus on the right side where it says modules, and you install scatter SCATR. I'm going to use the scatter plot here. And we're going to use the sepal length as a predictor of sepal width. Now sepal width is the one that we're interested in. And what you see right here is if I put a regression line through it and I even put a standard error, that's basically flat. There's no association between these two things overall. And I'm going to close this so we can save this one. But then I'm going to do it again. I'm going to come down to scatter again. And I'm going to put sepal length on the x-axis as a predictor and sepal width on the y-axis as the outcome. But this time I'm going to break it down by species. And now what you see is when we put it there is there's this really big separation. The red group is the sitosa ones. And those are the ones that we saw as larger when we looked at their density. This means that an analysis of covariance might be an appropriate thing. So let's go and do that right now. We go to ANOVA and come down to ANCOVA for analysis of covariance. And we've got a lot of options here, but I want to go through and show you just the basics. The first thing is the dependent variable or the outcome. And we're using sepal width. I'm going to put that right there. Fixed factors is the nominal or categorical variable that you're using to define the groups. And in this case, that's species. And you can see the table's filling in and it's telling us that there is a difference between the species that they are not all the same. But I'm also going to take sepal length and put that in as a covariate right here. And now we have this table that says that species has a statistically significant effect. It's actually really strong. As does sepal length. Now, what we want to do is use a partial eta squared as a way of looking at the relative contribution of these two. And we see that species has a partial eta squared of 0.56. That means that the species can account for 56% of the variance in the outcome sepal width all on its own. And the sepal length can account for 28% on its own. These don't add up. These are separate considerations, but you can use them to compare them with each other. But we have a lot of other options for things we can do. For instance, depending on how many variables you have, and if you want to have interactions, you can specify that in the model. And I want to put in an interaction right here because if you look at this chart, not only do these lines differ in how high they are vertically, which would be their y-intercept, they also differ in their slope, which is the association between the length and the width. So I want to include that as an interaction. So I'm going to select the both of these to a shift click to get both. And then say add the interaction. And now you can see that the species effect has gone way down. It was much higher before. And the interaction between the two has become important. You also have certain assumptions like the homogeneity of variance and like the QQ plot of residuals. I'm going to do that one because we want the residuals or the amount of error that's left over after our prediction to be approximately normally distributed. They would all fall on the diagonal if they were perfect normal distribution. These are close, so we're not far off. You can specify specific contrasts if you have different groups you want to do. And you can use these. I'm not going to bother with that right now. But maybe you want to do post hoc tests. Now we only have one factor in that species, but it does have three groups. And so we put that over here, and it's going to do the 2K comparison by default. And from this we can see that CITOSA differs significantly from both versicolor and virginica. The p-value here is well below the standard cutoff of .05. But the versicolor and virginica have a lot of overlap, and so they are not significantly different from each other. And then finally, we can get estimated marginal means. Now these aren't going to tell us anything new because we already have the means for the different groups. But if you had a more complicated design, you could put those in there along with interactions and get the means charts for the factor predictors. But for a model with one categorical variable, one nominal variable, and that's the species, as well as a single covariate, which in this case is sepal length. And then using those jointly to predict the sepal width in the analysis of covariance, you can see how this can get set up and allow you to do a little more drilling down to get some more insight from your data. And you can find the patterns that are going to be of most theoretical and most practical interest when doing the ANCOVA in JMOVI.