This video will provide an overview of matching. The goals are to provide a better motivation for matching in general. So, what is the motivation behind matching? We also want to understand what population is targeted. And finally, well, try to understand the subtle difference between stochastic balance and fine balance. We'll begin by thinking about matching in terms of a single covariate. So remember that the goal of matching is to match treated subjects and control subjects on their covariates, so on the set of covariates that we identified as sufficient to control for confounding. In this case, we'll imagine that there is just one covariate, and let's say it's hypertension. So hypertensive patients will say are, that we'll call with red, and patients without hypertension we'll color in blue. So the main idea here is that, imagine that hypertension diagnosis partially determines what treatment somebody gets and also might be related to the outcome. So that's a variable we want to control for. And here's our, imagine that we have this small population here where we have these treated subjects on one side and the control subjects on the other. One thing you'll notice then is that there's imbalance on the covariate, on hypertension. So, for treated subjects, it's 67% are red, so 67% of control subjects have, I mean, of treated subjects have hypertension, whereas for control subjects, it's the opposite kind of situation where the majority are blue. So in that for control subjects, 20% are red, so only 20% have hypertension. So there's big imbalance on this covariate, whereas we recall that for a randomized trial, we would expect the percentage of hypertensive patients to be the same or roughly the same for treated and controls. But what we can do then is we can match each treated subject to a control subject. So you'll notice here we just paired it up – a red treated subject with a red control subject. Now we've matched a blue to a blue, a red to a red, another red to a red, a blue to a blue, and a red to a red. So we found six matched pairs here, and we've just erased the rest of the controls. So this is essentially what happens in matching is you find the best matches you can and then you get rid of the people who weren't matched. And now you'll notice that we have perfect balance on this covariate. So in both the treated group and the control group, we have 67% red circles. So this is not unlike what you would see in a randomized trial where you would have perfect balance on the covariate or covariates. But of course, it's going to become much more complicated when you have many covariates. So in the previous slide, we had a single variable that we wanted to control for, and it was just a yes-or-no, binary kind of variable. But if you have many covariates, some of which might be continuous, it gets much more complicated. And in fact, we would probably not be exactly match on the full set of covariates; we almost certainly won't be able to. There are going to be treated subjects who don't have any control subjects who are exactly like them in terms of the covariates. However in randomized trials, treated subjects and control subjects won't be perfect matches either. In a randomized trial, there might be, for a given treated subject, there might not be a single control subject to would be a perfect match, but the distribution of covariates will be balanced between the groups in a randomized trial – and we'll call that stochastic balance, that type of balance. So if we match closely on covariates, we'll be able to achieve the same kind of stochastic balance. So it doesn't mean that we match exactly, but we'll have close matches and the distribution, then, of the covariates should be very similar in the two groups. So here's an example where we have two covariates now. So it's just sex, which is just M and F for male and female, and age, so age in years. And I'm just imagining a simple case where we have two treated subjects and then more controls. And typically, if you're going to do matching, you'll need one of the groups to be a lot bigger so you have a lot to choose from to find a good match – and most often that's going to be the control group where there's more to choose from. So first, you can imagine one way you could try to find a good match here to this first treated subject is by looking at men. The first treated subject is a male, age 56, so in the control group we could try to find another male who's about the same age. So you'll notice that there is a male that's aged 55 in that group, and so we could select that as a match. So next, we can look at the next treated subject which is a female, age 47, and in fact, if you look at all of the women in this, in the control group, we find one that's an exact match. So what we're doing then is we're making the distribution of the covariates and the control population look like that in the treatment, in the treated population. And this is perhaps a subtle distinction, but in just going back to the slide, we started with the treated group and we tried to find people in the control group who are like them. So, ultimately, what that's going to do is make the distribution of covariates in the control group look like that in the treated group. So what we'll ultimately then estimate if we follow that kind of procedure is a causal effect of treatment on the treated. So, this is a figure that we've seen before where if you start with the treated population – so that's this little partial circle – if you start with the treated population and you were to then consider two hypothetical worlds – one, where everyone in this population didn't get the treatment or got treatment, A=0, and then a separate world where the same people were actually given the treatment, A=1 – and then we took the mean of those, that would be the causal effect of treatment on the treated. So this is in contrast to the average causal effect in the whole population. So, often in matching, we focus on the causal effect of treatment on the treated and that would be the case if you start with the treatment group and find matches for each treated person from the control population because then you're making the control population have the same distribution as the treated population. So therefore, who we are making inference about is the treated population. You can do matching where you try to make the treated and control populations not only look like each other, but look like the population as a whole. So that involves slightly more complicated techniques but it can be done. But typically when people match, they focus on estimating the causal effect of treatment on the treated. So this is a valid causal effect, but we're making inference about the population who actually received the treatment. So what that's doing, as a reminder, is you take the population who were treated, we're comparing their outcome to what their outcome would have been had none of them receive treatment. So what is the impact of treatment on those who actually receive treatment? So that is a causal effect on the population of people who receive treatment. So, as I mentioned, there are methods that can be used to target a different population, but we're not going to discuss that in this video. So just remember that typically in matching, if you begin with the treated group and then try to find controls that are good matches for them, you're essentially making inference about the treated population, so you're estimating the causal effect of treatment on the treated. So, there's also this concept called fine balance. So the idea here is that sometimes we might not be able to find great matches. So probably for a lot of subjects, we'll be able to find a very good match, but there might be some where we can't. However, we might be able to tolerate some non-ideal matches if we still end up with the same distribution, the same marginal distribution of covariates between treating and controls, and we'll call that fine balance. So, to make it more clear, we'll look at this, a particular example where we have two matches. So, the first match we have a treated subject who's a male, age 40, and they're matched to a control that's female that's aged 45. So you'll notice here, it's not really a great match. We have a male matched to a female, so that's not ideal, and they're not the same age. So it's not a great match. Match two, we have a treated female, age 45, who's matched to a control, male, age 40. So again, that's not a great match. So in that case, we don't have great stochastic balance, but we actually have fine balance here because now if you combine these two, these two matches, now the treated population is 50% male, the average age in the treated population is 42.5; in the control population, it's 50% male and the average age is 42.5. We have the same distribution of sex and age in the two populations, in the treatment and control populations, even though these weren't great matches. So this will be considered fine balance. So we've achieved fine balance in this case even though the matches aren't great. So this is something we might be willing to tolerate. So we might be willing to tolerate non-ideal matches if we still get fine balance. So there's a lot of software that can impose fine balance kinds of constraints on matches. So it's always going to look for the best pairwise kind of matches, but it will tolerate some bad matches as long as we get fine balance. So this is something that, in software, you can actually ask for, you can tell it, "I want fine balance," and it would use that kind of a constraint as it's trying to find matches. So another issue has to do with the number of matches. So so far, I've focused on pair matching, which is one-to-one matching. So this is: for each treated person, we'll find a match that's a control, but we'll just find one match, one matching control for each treated person and then we discard anybody who wasn't matched. But you could do many-to-one matching. So we could decide ahead of time, OK, we're going to match K controls to every treated subject. For example, you could do five-to-one matching. So for every treated subject, we might find five good matches. So that's one option. Another option is variable matching where sometimes we might match one, sometimes we might match more than one, and that would depend on how many good matches we can find. So you could say, you could specify that we'll always find at least one match, but we'll take more than one match for a given treated subject if we can find good matches. So that would be a variable match, where we allow the number of matches to vary. So we'll think about trade-offs between these various approaches, but in the big picture, one-to-one matching should result in better matches because you're not trying to match as many control subjects to a given treated subject, but you are discarding some data, so you might lose some efficiency.