 Multi-level data can be used for estimating different kinds of effects. In this video I will explain the difference between the within effect, the between effect, the contextual effect and the population average effect. Because these effects have different interpretations, it is important to specify which effect you are interested in. And that depends on your research question and more generally on the objective of your statistical analysis. Books on multi-level modeling typically start by explaining the difference between the within effect and the between effect. But I think it's more useful to understand and easier to understand the difference between the within effect and the contextual effect first. The within effect tells us what is the effect of an individual level variable on an individual level outcome. For example, how a person's intelligence influences a person's task behavior or how a company's innovativeness influences a company's performance. The within effect has a clear policy implication because it implies that when an individual level varying attribute or trait changes, then there is a change in an outcome variable of interest. So if you want more of y, do more of x. The contextual effect on the other hand tells the effect of context. So how do the actions of others in the same context influence individual level behavior? Or the other way, how does individuals actions influence others in the same context? Typically, the contextual effect is explained as what is the effect of a mean characteristic on an individual level outcome. The difference between the within effect and the contextual effect is perhaps best understood through examples. Let's take a look at four examples. The first is vaccinations. So if you vaccinate yourself, then you are less likely to develop a serious disease. So there is a within effect. Your vaccination helps you. But there is also a contextual effect because if others around you vaccinate themselves, then that creates herd immunity, which protects also those people who don't vaccinate. So the within effect here is positive and the contextual effect is positive as well. We can also have examples of a positive within effect and a negative contextual effect. For example, overfishing. If an individual fisherman exceeds their quota, then their profits will increase because you get more fish to sell. If everyone else in the same lake overfishes, then there is a negative effect on profits because overfishing leads to less catches or smaller catches for everyone. So the within effect is positive, but the contextual effect is negative. They may in some scenarios also cancel each other out. Another example, innovativeness on company performance. If a company innovates a lot, then they can develop valuable capabilities that lead to competitive advantage. But if everyone else around the focal company innovates a lot, then innovations are no longer valuable because everyone has these innovations. And also if a firm doesn't innovate, then they will fall behind and their performance will suffer. So innovation could have positive within effect and a negative contextual effect. We could also have a variable that doesn't have a within effect but has a contextual effect. For example, gender. How does individual's gender influence individual's performance in a team? We can say that individual's performance doesn't depend on individual's gender, so there is no within effect. But we can also say that gender has an effect on the contextual level. For example, teams with half men, half women work better than only men teams or solely women teams. Okay, so that's the contextual effect and the within effect. And how does this relate to the between effect, which is typically introduced in books about multiple modeling? The between effect is simply the sum of the within effect and the contextual effect. And it tells us what is the influence of a mean characteristic of a group to the mean outcome of a group. And it doesn't have as clear policy implications or causal interpretations as the within effect and the contextual effect. Then the population average effect is simply a regression line over the data ignoring all clustering. It answers the question of what is the most likely value of y given a known x and it's a weighted sum of the within effect and the between effect or the within effect and the contextual effect. And it doesn't really have a clear causal interpretation. So the population average effect is more useful for predictive applications than the within effect and the contextual effect. Let's take a look at example of these effects from a paper by Anders and Tofiki in psychological methods. So they have data and they have individuals wellbeing here on the y-axis and individuals work hours here on the x-axis and they have three individuals, one, two and three over five weeks. So we have five repeated observations of each individual and these are synthetic data. Now the first effect that we have here is the between effect. So this is how does the mean wellbeing of a person depend on the mean work hours of a person. So we basically calculate means of these clusters for each of these three individuals or both variables. So we have three observations of two variables each and we run a regression on those three observations, those three cluster means for two variables and then we have the between effect. Then we have the within effect. The within effect tells how changing your work hours influences your wellbeing. So it's a regression line that we get when we ignore the differences between these groups. So we basically put these ovals on top of each others. We eliminate all between group differences and then we run a regression line through the ovals and that tells us the direction of an individual level change. So this person here who is relatively well off will never become this bad in wellbeing regardless of how well, how much they work because the only the within effect influences an individual level outcome. And this person is overall for some reason a lot higher on wellbeing than this person. So this is the between effect is the constant stable difference between people and the within effect tells how much variation there is within individuals. Then the population average effect is simply if we run a regression line through the data ignoring all clustering effects and we get another line which in this case is closer to the between effect and that line really doesn't have any clear causal interpretation. There are a couple of relationships that we need to understand within effect and the contextual effect. If there are within effect is zero and the contextual effect is zero, then all effects are zero. So two variables are linearly unrelated. If we have within effect that is not zero, but the contextual effect that is zero, then all effects are equal. So the within effect, the between effect and the population average effect just give you the same value. And this is a scenario where all the individuals are perfectly comparable. All the groups or all the companies are perfectly comparable. So there are no systematic differences between groups, companies or people that we observe or whatever our cluster variable is. So these are our simple cases. Then if there is no within effect, all effects are contextual, then the contextual effect, the between effect and the population average effect are the same. And in all of these three cases, things are fairly simple because we can just run a regression model to get the population average effect, ignore the clustering, and that will give us the effect of interest. But if the within effect is not zero and if the contextual effect is not zero, then all effects are distinct. So the within effect, between effect, contextual effect and population average effect all generally have a different value for a variable. And then which of those values is the one that you should be focusing on depends on your research question. So this is the most common case, which is unfortunate because it complicates our life. But there are also other interesting things in this table. So in econometrics when we do multi-level modeling or parallel data analysis, we typically want to make something called the random effects assumption. And I'm going to explain the random effects assumption in another video, but this within effect is not zero and contextual effect is zero is basically what the random effects assumption is about. Anyway, the key outcome or the key thing to know about this slide is that you need to be specific on which effect you're interested in. So when you write a paper, try to use the term within effect between effect or contextual effect just to let your readers to understand which effect you want to know and why. And then your readers are also better off in understanding if you have estimated the effect of interest correctly. Most commonly what we want to know is the within effect, which tells how changing individual level variables affects individual level outcomes.