WEBVTT 1 00:00:22.600 --> 00:00:27.130 David Stephens, Prof: Okay to pick up for the second half 2 00:00:27.340 --> 00:00:30.020 David Stephens, Prof: just a quick recap of what we've just looked at. 3 00:00:30.150 --> 00:00:34.589 David Stephens, Prof: So remember, we're trying to estimate the causal effect of a treatment 4 00:00:35.110 --> 00:00:38.209 David Stephens, Prof: in a randomized study. We could do that by. 5 00:00:38.630 --> 00:00:46.659 David Stephens, Prof: for example, randomly allocating individuals from a sampled from a study population 6 00:00:47.640 --> 00:00:57.410 David Stephens, Prof: with probability, P. To treatment with probability, one minus P. To no treatment. If we do that, then that breaks the connection between the covariates X and Z. 7 00:00:57.900 --> 00:01:02.880 David Stephens, Prof: Leaving us with 2 groups, the treated group and the untreated group which are directly comparable. 8 00:01:03.080 --> 00:01:05.750 David Stephens, Prof: So we can just do a 2 group comparison. 9 00:01:06.460 --> 00:01:09.080 David Stephens, Prof: Taking the average in the treated group. 10 00:01:09.470 --> 00:01:11.659 David Stephens, Prof: the average in the no treated group. 11 00:01:12.170 --> 00:01:15.219 David Stephens, Prof: and looking at the difference between them, to understand the causal effect. 12 00:01:16.350 --> 00:01:30.490 David Stephens, Prof: we could do the same thing. But instead of using the actual number treated in the denominator for the formula, here we use the expected number, so the expected number not not treated, and the expected number treated in the 2 groups 13 00:01:32.130 --> 00:01:40.230 David Stephens, Prof: respectively, all right. So that works in the randomized study because precisely because of the reason 14 00:01:42.190 --> 00:01:49.989 David Stephens, Prof: which gives the randomized study its name, which is that we have randomized treatment. We have intervened to randomly allocate individuals in the study population. 15 00:01:50.850 --> 00:01:58.279 David Stephens, Prof: in the sample to treat and treated and non-treated groups with probability. P. 16 00:01:58.430 --> 00:02:01.540 David Stephens, Prof: Irrespective of their characteristics. 17 00:02:03.770 --> 00:02:06.499 David Stephens, Prof: And of course, we can generalize this to think about 18 00:02:08.449 --> 00:02:12.340 David Stephens, Prof: other other types of randomization or stratification, or whatever. 19 00:02:13.270 --> 00:02:20.549 David Stephens, Prof: Okay? So that works for the randomized or experimental setting. 20 00:02:22.160 --> 00:02:27.920 David Stephens, Prof: The second main challenge of causal inference, though, is that if we want to make the same inference from observational data. 21 00:02:29.910 --> 00:02:31.200 David Stephens, Prof: we don't have. 22 00:02:31.350 --> 00:02:38.089 David Stephens, Prof: The treatment or exposure is assigned independently of other variables in general, we don't know that. 23 00:02:39.970 --> 00:02:44.190 David Stephens, Prof: So if there is a dependence due to 24 00:02:44.300 --> 00:02:48.559 David Stephens, Prof: the presence of those other variables, that is, knowledge. About X. The 25 00:02:48.700 --> 00:02:53.229 David Stephens, Prof: characteristics influences the probability that they receive treatment. 26 00:02:54.530 --> 00:03:01.270 David Stephens, Prof: Then we have what's called confounding, as in this 27 00:03:01.420 --> 00:03:03.410 David Stephens, Prof: dag here that we saw before. 28 00:03:03.610 --> 00:03:11.080 David Stephens, Prof: So x is a confounder in this dag, because X predicts Y in the presence of Z, 29 00:03:12.870 --> 00:03:18.680 David Stephens, Prof: and also x predict predict z, right meaning that 30 00:03:18.990 --> 00:03:23.110 David Stephens, Prof: so the conditional distribution of y given Z changes with x. 31 00:03:23.460 --> 00:03:26.130 David Stephens, Prof: and the distribution of Z changes with x. 32 00:03:28.970 --> 00:03:33.870 David Stephens, Prof: So this is the so-called confounding classic confounding setting. 33 00:03:34.460 --> 00:03:38.110 David Stephens, Prof: and it might well pertain in 34 00:03:38.930 --> 00:03:48.859 David Stephens, Prof: the the observational study. It might be that we have that X influences Y in the presence of Z, and it might be that X influences Z. 35 00:03:51.590 --> 00:03:58.139 David Stephens, Prof: So in this case, that we saw earlier only might be the socioeconomic status. Is this 3rd variable X. 36 00:03:58.240 --> 00:04:02.989 David Stephens, Prof: And we might at least suspect that 37 00:04:04.980 --> 00:04:09.220 David Stephens, Prof: socio socioeconomic status influences both the 38 00:04:09.390 --> 00:04:14.329 David Stephens, Prof: choice of diet and the incidence of chronic diseases. 39 00:04:14.640 --> 00:04:15.670 David Stephens, Prof: Cbd. 40 00:04:18.870 --> 00:04:23.780 David Stephens, Prof: All right. So in that setting we have confounding. 41 00:04:23.920 --> 00:04:34.100 David Stephens, Prof: And the thing about confounding is that it messes up our previous construction for estimating the causal effects, because 42 00:04:34.970 --> 00:04:40.150 David Stephens, Prof: if you take the binary case, if confounding is present, treated, and untreated groups 43 00:04:40.250 --> 00:04:43.750 David Stephens, Prof: are not exchangeable, they're not directly comparable. 44 00:04:44.550 --> 00:04:48.100 David Stephens, Prof: The effect of the confounder might be 45 00:04:50.270 --> 00:04:55.520 David Stephens, Prof: might be different. In the. In the treated and untreated groups we might have a different 46 00:04:55.650 --> 00:05:02.169 David Stephens, Prof: profile of those characters might be an age, systematic age. Difference between treated and untreated. For example. 47 00:05:02.720 --> 00:05:06.800 David Stephens, Prof: socioeconomic status might be different systematically in the 2 groups. 48 00:05:07.710 --> 00:05:11.060 David Stephens, Prof: And what that means is that the simple 2 group comparison 49 00:05:11.880 --> 00:05:18.709 David Stephens, Prof: is not valid for getting an estimate of the causal effect, because we don't know that 50 00:05:19.440 --> 00:05:24.918 David Stephens, Prof: simply changing treatment from 0 the the effect that we see when we 51 00:05:26.320 --> 00:05:29.419 David Stephens, Prof: look at the differences between the 52 00:05:29.600 --> 00:05:33.599 David Stephens, Prof: treated in untreated groups is due to treatment. It may be due to other factors. 53 00:05:35.150 --> 00:05:45.060 David Stephens, Prof: We had that guarantee in the randomized study case, because there was no connection between treatment and anything else in the in the covariates right? 54 00:05:45.320 --> 00:05:48.229 David Stephens, Prof: But in the observational study we don't have that guarantee. 55 00:05:49.420 --> 00:05:54.020 David Stephens, Prof: So what that means is that the direct comparison of the 2 sample means is not 56 00:05:55.570 --> 00:05:58.359 David Stephens, Prof: a valid way of getting causal inference. 57 00:05:59.470 --> 00:06:03.790 David Stephens, Prof: because causal inference requires us to compare the treatment 58 00:06:03.940 --> 00:06:09.209 David Stephens, Prof: groups on an equal footing. So we have to make sure there's no effect of those other predictors. 59 00:06:10.600 --> 00:06:13.779 David Stephens, Prof: at least in in terms of understanding the treatment effect. 60 00:06:14.380 --> 00:06:20.589 David Stephens, Prof: So it's possible in a randomized study. But it's not possible, at least directly in the presence of confounding. 61 00:06:23.050 --> 00:06:31.409 David Stephens, Prof: And just to note here that confounding is not the same as non-collapsibility that we mentioned before. This is not a marginal effect against conditional effect. Issue 62 00:06:31.990 --> 00:06:37.970 David Stephens, Prof: collapsibility or non-collapsibility is due to the structure of the model and not the structure of the variables. 63 00:06:38.160 --> 00:06:40.809 David Stephens, Prof: Right? The problem in the 64 00:06:42.060 --> 00:06:47.540 David Stephens, Prof: the problem in the confounding case is that X and Z have some joint structure. 65 00:06:49.800 --> 00:06:56.730 David Stephens, Prof: So Z is influenced by X right, and we could get 66 00:06:58.610 --> 00:07:11.239 David Stephens, Prof: so that will always be present, irrespective of the model that we use, whereas the issue of collapsibility or non-collapsibility is really down to the choice of model that we use right, and the way that we interpret parameters 67 00:07:11.370 --> 00:07:20.989 David Stephens, Prof: so that marginal and conditional parameters are not, are not the same right? And that would be the case if we had confounding, or if we had no confounding. 68 00:07:22.300 --> 00:07:25.389 David Stephens, Prof: Okay. So just to draw a distinction between those 2 things. 69 00:07:26.300 --> 00:07:34.590 David Stephens, Prof: And I put together this little example to to illustrate in a simple calculation the effect of confounding on 70 00:07:34.950 --> 00:07:39.870 David Stephens, Prof: the estimator of the causal effect. 71 00:07:40.420 --> 00:07:49.059 David Stephens, Prof: So imagine that we have 3 binary variables XY. And Z. So the outcome and the covariate is also binary. The treatment is binary. 72 00:07:49.900 --> 00:07:57.689 David Stephens, Prof: And suppose that we have this structural relationship. So this is the true data generating relationship between XY and Z. 73 00:07:57.960 --> 00:08:10.579 David Stephens, Prof: It's really the expected value y, or the probability that y takes the value one in the binary outcome setting. And it takes this value, and these numbers are carefully chosen, such that that probability stays between 0 and one 74 00:08:11.940 --> 00:08:19.289 David Stephens, Prof: right? So this is the effect, and it and the the model tells us that well, there's an intercept, but there is an effect of 75 00:08:19.920 --> 00:08:20.990 David Stephens, Prof: treatment 76 00:08:21.875 --> 00:08:27.980 David Stephens, Prof: with the coefficient point 2. So if I change z from 0 to one, I get a an increase in 77 00:08:28.500 --> 00:08:31.100 David Stephens, Prof: the expected response of point 2. 78 00:08:31.710 --> 00:08:34.000 David Stephens, Prof: And then there's also a dependence on X, 79 00:08:34.470 --> 00:08:43.089 David Stephens, Prof: right? So this model here doesn't tell us about confounding directly it's a. The fact that the conditional model depends on 80 00:08:43.640 --> 00:08:49.039 David Stephens, Prof: conditional model for Y given X and Z depends on X and Z is part of the story. 81 00:08:49.530 --> 00:08:56.689 David Stephens, Prof: But it's not completely the confounding story. So here we have the X and Z predict y. 82 00:08:58.080 --> 00:09:01.470 David Stephens, Prof: but we don't know yet about the relationship between X and Z. 83 00:09:02.400 --> 00:09:10.070 David Stephens, Prof: Okay. Now, even in so and this is a a, again, a nice thing to stress here is that we can compute 84 00:09:10.520 --> 00:09:23.920 David Stephens, Prof: the causal effect of treatment here just by knowing this model right and 85 00:09:24.150 --> 00:09:28.419 David Stephens, Prof: the X characteristic. So I'm setting up the fact that the the binary 86 00:09:28.540 --> 00:09:33.109 David Stephens, Prof: covariant X has probability. Q. Of taking the value one. 87 00:09:33.740 --> 00:09:36.300 David Stephens, Prof: So one minus Q of taking the value 0. 88 00:09:37.050 --> 00:09:48.060 David Stephens, Prof: So we can compute the average potential outcome just by an analysis of this equation by remembering that under. 89 00:09:49.830 --> 00:09:59.199 David Stephens, Prof: And so for the causal calculation, what I need to do is imagine this structural equation where Z is no longer a random, variable. It's set to be some value. 90 00:10:02.080 --> 00:10:03.569 David Stephens, Prof: Little Red's that same. 91 00:10:03.790 --> 00:10:08.159 David Stephens, Prof: And then I need to take the expectation of this over the X distribution. 92 00:10:08.650 --> 00:10:17.199 David Stephens, Prof: So by iterated expectation. It's very simple to see that the expected potential outcome or average potential outcome at level Z is given by this formula. 93 00:10:17.620 --> 00:10:23.490 David Stephens, Prof: right? All I've done is to take expectations here with respect to the distribution of X. 94 00:10:24.810 --> 00:10:29.249 David Stephens, Prof: So when I do that, the expected value of X is just Q. So I get this. 95 00:10:30.020 --> 00:10:37.680 David Stephens, Prof: So that's the average. That is the S demand for the average potential outcome. And I can see from that that if I change from 0 to one. 96 00:10:38.170 --> 00:10:43.409 David Stephens, Prof: then the causal effect. The average treatment effect is 0 point 2 97 00:10:44.060 --> 00:10:49.010 David Stephens, Prof: right. And we spot that as just being the coefficient of Z here, all right. So 98 00:10:51.550 --> 00:10:56.310 David Stephens, Prof: to understand the effect of confounding. We need to know the relationship between X and Z. 99 00:10:56.480 --> 00:11:01.149 David Stephens, Prof: So I'm going to assume that the probability that Z equals one given X is 100 00:11:01.420 --> 00:11:06.430 David Stephens, Prof: p. 0, if x is 0 and p. 1, when x is one. 101 00:11:08.090 --> 00:11:12.899 David Stephens, Prof: right? So that means that there's a different Z profile in the 2 X groups. 102 00:11:14.100 --> 00:11:22.490 David Stephens, Prof: and I can rewrite that formula using the short form here. So when x is 0, I get p. 0, and when x is one, I get p. 1, 103 00:11:24.220 --> 00:11:30.679 David Stephens, Prof: and also from that, given our knowledge of XI can work out what the marginal distribution of Z is 104 00:11:30.910 --> 00:11:39.909 David Stephens, Prof: by using theorem of total probability, and so on, and we say that we can see that the probability that Z is one is just one minus Q. Times, P. 0, 105 00:11:40.060 --> 00:11:43.540 David Stephens, Prof: plus Q. Times, p. 1 which I'm going to call pay. 106 00:11:43.840 --> 00:11:49.420 David Stephens, Prof: Right? So P. Is the probability of getting treated in the observational study. 107 00:11:50.290 --> 00:11:52.769 David Stephens, Prof: Right? So those are the that's the setting. 108 00:11:53.500 --> 00:11:54.025 David Stephens, Prof: Okay? 109 00:11:54.870 --> 00:12:06.639 David Stephens, Prof: And my interest is going to be in estimating this quantity using a sample average method. 110 00:12:06.930 --> 00:12:08.300 David Stephens, Prof: So the 111 00:12:09.090 --> 00:12:20.520 David Stephens, Prof: naive average treatment effect estimator is the difference in the 2 means of the 2 groups. So let's suppose I have this as the estimator. This is the mean in the treated group. 112 00:12:20.640 --> 00:12:23.090 David Stephens, Prof: minus the mean in the untreated group. 113 00:12:24.920 --> 00:12:31.929 David Stephens, Prof: Well, it's very easy to see going through the calculations, and I included them in the in the 114 00:12:34.850 --> 00:12:40.469 David Stephens, Prof: in. The won't click on that. In the example at the back the full details of the calculation. 115 00:12:40.840 --> 00:12:45.599 David Stephens, Prof: But it turns out that if you work out the theoretical properties of this estimator 116 00:12:46.500 --> 00:12:50.580 David Stephens, Prof: which you can do. It's a little bit involved, but it's not too difficult. 117 00:12:50.710 --> 00:12:55.449 David Stephens, Prof: You find that the expected value of this is equal to this. 118 00:12:56.760 --> 00:13:03.470 David Stephens, Prof: So it's point 2, which is the true value, minus some quantity, which is non-zero. 119 00:13:04.090 --> 00:13:06.420 David Stephens, Prof: and it's a quantity that depends on 120 00:13:07.160 --> 00:13:10.260 David Stephens, Prof: the joint distribution of the X and Z's. 121 00:13:11.350 --> 00:13:14.919 David Stephens, Prof: If Q is 0, then I get 0. 122 00:13:17.350 --> 00:13:22.570 David Stephens, Prof: If Q is 0, then I only get one treatment group. 123 00:13:23.380 --> 00:13:27.970 David Stephens, Prof: and it's 0. If these 2 things are equal, okay? 124 00:13:28.240 --> 00:13:38.440 David Stephens, Prof: And that really comes down to having P. 0 equal to p, 1, meaning that there's no difference between the treatment groups in terms of the Z profile. 125 00:13:38.920 --> 00:13:48.129 David Stephens, Prof: Okay, so I won't go through the details here. You can look click on the example in the back there, and it'll show you the the full details of the calculation fairly standard 126 00:13:48.680 --> 00:13:53.119 David Stephens, Prof: statistical calculations. So that shows that the presence of confounding 127 00:13:55.170 --> 00:14:06.320 David Stephens, Prof: leads to bias in the estimation. If we use the straightforward difference in means estimator. So that's what we have to adjust for. That's what we have to break when we use causal inference methods. 128 00:14:07.640 --> 00:14:18.989 David Stephens, Prof: The bias there is caused by the fact that the 2 observed subsamples with z equal, one and z. Equal 0, have different X profiles. They are not directly comparable. 129 00:14:21.600 --> 00:14:28.099 David Stephens, Prof: and we also know that X influences Y in the outcome model. 130 00:14:29.450 --> 00:14:34.360 David Stephens, Prof: So because of this different profile of the x's. 131 00:14:36.280 --> 00:14:45.949 David Stephens, Prof: the sample mean the ordinary sample. Mean quantities are in some sense contaminated by the presence of those x's, the different, the effect of the x's. 132 00:14:46.400 --> 00:14:55.180 David Stephens, Prof: and that renders the 2 sorry. That renders the difference. Estimator. Difference in sample means 133 00:14:55.970 --> 00:14:57.239 David Stephens, Prof: to be biased. 134 00:14:57.900 --> 00:15:08.699 David Stephens, Prof: So the bias is caused by the fact that the 2 observed subsamples identified by the treatment group labels are not directly comparable. Their X's are systematically different. 135 00:15:10.720 --> 00:15:13.999 David Stephens, Prof: And we can see that they're systematically different by looking at 136 00:15:14.770 --> 00:15:18.830 David Stephens, Prof: characteristics of the conditional distribution of X in the 2 groups. 137 00:15:20.870 --> 00:15:23.980 David Stephens, Prof: So if I compute the probability that X equals one 138 00:15:24.380 --> 00:15:29.039 David Stephens, Prof: conditional on Z equals one, that's a simple base theorem calculation. And I get this. 139 00:15:30.040 --> 00:15:35.719 David Stephens, Prof: whereas if I compute the same conditional probability, but condition on z equals 0, then I get this. 140 00:15:36.590 --> 00:15:43.040 David Stephens, Prof: And the key thing is that in general this number is different from this number, right? 141 00:15:43.830 --> 00:15:50.179 David Stephens, Prof: So the bias is caused by this imbalance. 142 00:15:51.800 --> 00:15:57.709 David Stephens, Prof: The X profile is different in the 1st group compared to the second group. 143 00:16:00.970 --> 00:16:09.920 David Stephens, Prof: and of course, conditioning on Z equals one and z equals. 0 is exactly what we do when we compute the individual sample means for the 2 groups. 144 00:16:12.270 --> 00:16:18.919 David Stephens, Prof: Okay, so this issue, plus the fact that X influences Y directly 145 00:16:19.640 --> 00:16:23.099 David Stephens, Prof: means that the sample means do not give us. 146 00:16:24.200 --> 00:16:31.169 David Stephens, Prof: when we look at the difference, an estimate of the average treatment effect an unbiased estimate of the average treatment effect. 147 00:16:31.850 --> 00:16:32.710 David Stephens, Prof: Okay. 148 00:16:35.870 --> 00:16:49.319 David Stephens, Prof: so that so I encourage you to work through the calculation there. But this shows that this shows exactly how the bias arises, due to the presence of various terms in the joint distribution of X and Z. 149 00:16:54.050 --> 00:17:00.150 David Stephens, Prof: I want to identify one special case of interest. 150 00:17:01.073 --> 00:17:10.989 David Stephens, Prof: Which is the case of an instrument. So an instrument is another X variable, another another covariate, computed, or sorry, collected in the sample. 151 00:17:11.650 --> 00:17:20.999 David Stephens, Prof: But in our understanding of the structural relationship between the variables, that instrument predicts Z, the treatment but doesn't predict the outcome. 152 00:17:22.349 --> 00:17:27.480 David Stephens, Prof: Right? So the relevant dag would look like this. I've got something that is a 153 00:17:27.730 --> 00:17:33.340 David Stephens, Prof: predictor of the treatment received, but that in itself doesn't influence. Why. 154 00:17:34.530 --> 00:17:42.400 David Stephens, Prof: so? A classic example of this is where we have a randomized study within with incomplete compliance. 155 00:17:42.660 --> 00:17:47.099 David Stephens, Prof: so Xi. Would be the treatment assigned by the randomization. 156 00:17:47.770 --> 00:17:52.359 David Stephens, Prof: But then Z would be the treatment actually taken by the subject. 157 00:17:53.090 --> 00:18:00.209 David Stephens, Prof: So we know that the randomization label, or at least we assume the randomization label influences the treatment received. 158 00:18:00.930 --> 00:18:05.209 David Stephens, Prof: But once we know the treatment received. Only that is relevant for the outcome. 159 00:18:06.610 --> 00:18:09.089 David Stephens, Prof: Okay? In that case we wouldn't. Yeah. I mean. 160 00:18:09.270 --> 00:18:22.019 David Stephens, Prof: this arrow may or may not be there. It doesn't doesn't matter. The key relationship I'm thinking about here is the relationship between the instrument and Z and a lack of relationship between the instrument and Y. 161 00:18:23.090 --> 00:18:24.770 David Stephens, Prof: Once I've observed that. 162 00:18:25.950 --> 00:18:29.910 David Stephens, Prof: Okay, so this Xi is an instrument and 163 00:18:32.280 --> 00:18:36.349 David Stephens, Prof: the point of me making this note. Oh, yeah. So it just says that there sorry. 164 00:18:37.800 --> 00:18:40.169 David Stephens, Prof: The point of me making this note is that 165 00:18:40.340 --> 00:18:44.499 David Stephens, Prof: instruments are not confounders because they don't predict the outcome. 166 00:18:47.240 --> 00:18:49.510 David Stephens, Prof: So, for example, we might have 167 00:18:49.980 --> 00:18:52.189 David Stephens, Prof: in a similar kind of model as before. 168 00:18:52.670 --> 00:18:59.370 David Stephens, Prof: This is the conditional mean model for y. Given x, and Z. It only depends on z 169 00:19:02.930 --> 00:19:03.710 David Stephens, Prof: right. 170 00:19:04.060 --> 00:19:08.549 David Stephens, Prof: So in this case X is not a confounder. 171 00:19:18.960 --> 00:19:20.819 David Stephens, Prof: So X influences Z. 172 00:19:21.960 --> 00:19:22.810 David Stephens, Prof: And 173 00:19:23.250 --> 00:19:31.260 David Stephens, Prof: there is still, in fact, an imbalance between the subgroups indexed by Z with respect to their X values. For precisely this reason, right? 174 00:19:32.030 --> 00:19:35.989 David Stephens, Prof: So in terms of their ex 175 00:19:36.970 --> 00:19:42.240 David Stephens, Prof: profiles, the treatment group looks different from the non-treatment group. 176 00:19:44.280 --> 00:19:52.680 David Stephens, Prof: But in this case, because X does not influence Y, that imbalance is unimportant. 177 00:19:53.860 --> 00:20:01.499 David Stephens, Prof: If we use the sample, mean estimators. The difference between the sample mean in the 1st group and the sample mean in the second group 178 00:20:02.650 --> 00:20:11.460 David Stephens, Prof: that difference estimator will be unbiased for the true average treatment effect, even though 179 00:20:11.600 --> 00:20:14.579 David Stephens, Prof: the X's are imbalanced in the 2 groups. 180 00:20:15.620 --> 00:20:19.949 David Stephens, Prof: So the key point here is that it's only confounders 181 00:20:20.480 --> 00:20:23.320 David Stephens, Prof: that influence both Y and x. 182 00:20:23.440 --> 00:20:25.179 David Stephens, Prof: that we need to make sure 183 00:20:26.910 --> 00:20:32.390 David Stephens, Prof: are balanced, if you like. In the 2 groups. The X profile needs to be the same in the 2 groups 184 00:20:33.030 --> 00:20:35.639 David Stephens, Prof: for those variables, for those confounding variables. 185 00:20:37.970 --> 00:20:41.020 David Stephens, Prof: Sorry. Sorry for those potential confounding variables. 186 00:20:44.000 --> 00:20:49.219 David Stephens, Prof: Okay, so that's an important thing to remember when we'll see the impact of this 187 00:20:49.690 --> 00:20:52.000 David Stephens, Prof: in some places later on. 188 00:20:52.980 --> 00:20:59.830 David Stephens, Prof: So we need to recognize the effect of confounding 189 00:21:02.030 --> 00:21:06.420 David Stephens, Prof: by looking at confounding variables that predict y and predict z. 190 00:21:07.760 --> 00:21:10.189 David Stephens, Prof: but variables that only predict Z. 191 00:21:10.710 --> 00:21:15.060 David Stephens, Prof: They're not confounders, and they don't cause problems in 192 00:21:15.640 --> 00:21:18.449 David Stephens, Prof: the two-group comparison of sample means 193 00:21:20.680 --> 00:21:26.589 David Stephens, Prof: all right. So the other important assumption. What I want to mention now is the assumption of no unmeasured confounding. 194 00:21:26.870 --> 00:21:29.230 David Stephens, Prof: So that is the measured predictors. 195 00:21:29.430 --> 00:21:33.169 David Stephens, Prof: or a subset of them at least contain all the variables 196 00:21:33.430 --> 00:21:35.950 David Stephens, Prof: that confound the effect of Z on y. 197 00:21:36.170 --> 00:21:46.390 David Stephens, Prof: So when I've drawn those dags before those X's are all measured variables in the in the sample right 198 00:21:47.200 --> 00:21:56.479 David Stephens, Prof: and the no and measured confounding assumption assumes that there is no such variable U that has a relationship with Z and a relationship with Y. 199 00:21:57.370 --> 00:22:00.440 David Stephens, Prof: So for all of our causal inference methods to work. 200 00:22:01.550 --> 00:22:04.480 David Stephens, Prof: we have to have an absence of variables like you. 201 00:22:05.070 --> 00:22:06.690 David Stephens, Prof: And the point is that 202 00:22:08.490 --> 00:22:14.139 David Stephens, Prof: we're gonna ultimately be able to do something about the path from Z to Y that goes through X. 203 00:22:15.280 --> 00:22:17.699 David Stephens, Prof: But if we don't know that y is there. 204 00:22:18.660 --> 00:22:25.660 David Stephens, Prof: we don't have any way of handling the path that goes to y from z through U. 205 00:22:27.500 --> 00:22:37.520 David Stephens, Prof: So if these variables are there. There's always the chance that some effect of Z is going to leak out down that path, and there's nothing we'll be able to do about it, because we don't know of the path's existence. 206 00:22:38.770 --> 00:22:45.459 David Stephens, Prof: So our assumption is no unmeasured confounding. There's no variable U that sits in the dag that looks like this. 207 00:22:50.640 --> 00:22:55.730 David Stephens, Prof: So we must assume that all variables that simultaneously influence exposure, and outcome can be measured in the study. 208 00:22:56.150 --> 00:22:59.549 David Stephens, Prof: So critics of causal inference 209 00:23:00.700 --> 00:23:07.409 David Stephens, Prof: often point this out this assumption, which is very explicit in the causal inference, setting as being one of the 210 00:23:11.400 --> 00:23:16.740 David Stephens, Prof: unfortunate assumptions that you have to make, that in a sense invalidates the whole causal idea. 211 00:23:17.170 --> 00:23:23.449 David Stephens, Prof: It's a strong, unrealistic, and untestable assumption actually, in the observed data. 212 00:23:25.530 --> 00:23:35.419 David Stephens, Prof: But what the critics of causal inference methods forget is that that's the assumption you make all the time in every other sort of statistical analysis. You're just not explicit about it. 213 00:23:36.600 --> 00:23:44.020 David Stephens, Prof: Right in regression analysis. There is an assumption there implicitly of unknown measure confounding. 214 00:23:47.250 --> 00:23:49.509 David Stephens, Prof: Okay? So it's not actually a 215 00:23:50.080 --> 00:23:56.349 David Stephens, Prof: a weakness, as some people would contend of causal analysis methods. 216 00:23:57.650 --> 00:24:06.260 David Stephens, Prof: It's just an explicit statement that that assumption of the assumption of the lack of those u variables is 217 00:24:06.800 --> 00:24:08.740 David Stephens, Prof: holds in the problem. 218 00:24:10.180 --> 00:24:11.700 David Stephens, Prof: So it's more of a 219 00:24:12.940 --> 00:24:18.519 David Stephens, Prof: more of a an explicit acknowledgement rather than sweeping it under the under the rug, which is what 220 00:24:19.550 --> 00:24:22.180 David Stephens, Prof: one might do in standard regression analysis. 221 00:24:23.350 --> 00:24:26.860 David Stephens, Prof: Now, the assumption of no measured confounders can be relaxed. 222 00:24:31.630 --> 00:24:36.370 David Stephens, Prof: if you are happy to carry out sensitivity analysis, that is, you propose the 223 00:24:36.790 --> 00:24:45.710 David Stephens, Prof: possible magnitude of the effect of an unmeasured. Confound. So some people have done that sort of diverting the problem to, you know. 224 00:24:46.420 --> 00:25:07.249 David Stephens, Prof: than your models of of the unmeasured, confounding structure. And there's another possible way of handling or another claimed possible way of handling no measured, confounding relaxation, which is the method of instrumental variables, but that we won't look at in this module really makes a different 225 00:25:07.410 --> 00:25:11.810 David Stephens, Prof: but equivalent strong assumption, I would say, or at least a couple of 226 00:25:11.950 --> 00:25:18.199 David Stephens, Prof: equivalent, but but equally strong assumptions. So in the causal setting. 227 00:25:18.550 --> 00:25:25.870 David Stephens, Prof: This no measure confounding assumption is always going to be made, and it's always going to be critical and 228 00:25:26.000 --> 00:25:31.470 David Stephens, Prof: to to really make the conclusions valid as causal conclusions. 229 00:25:34.620 --> 00:25:37.029 David Stephens, Prof: The other thing to mention before we 230 00:25:37.340 --> 00:25:51.680 David Stephens, Prof: go into the statistical analysis, part explicitly is that when we talk about using sample averages, those are essentially non-parametric methods that was not proposing any model forms for the expectations 231 00:25:52.400 --> 00:25:53.320 David Stephens, Prof: we might. 232 00:25:54.460 --> 00:26:04.117 David Stephens, Prof: you know, just by by taking the averages over the sample, be able to estimate some features like mean and variance. But we're not gonna be as to be able to estimate any 233 00:26:05.733 --> 00:26:09.866 David Stephens, Prof: you know, slightly more complicated features. 234 00:26:10.650 --> 00:26:33.120 David Stephens, Prof: so typically, we don't just rely on completely non-parametric methods. We instead think about semi-parametric approaches which basically reduces to encapsulating those previous structural models into parametric regression like models. So that is particularly conditional models for the counterfactual outcome. Given eggs. 235 00:26:33.350 --> 00:26:38.309 David Stephens, Prof: so we might have some parametric form for this, some linear form, maybe 236 00:26:38.430 --> 00:26:42.039 David Stephens, Prof: to capture the same sort of structural relationship as we saw before. 237 00:26:43.160 --> 00:26:46.750 David Stephens, Prof: and then our task would be to estimate the parameters in that. 238 00:26:47.330 --> 00:26:51.310 David Stephens, Prof: So those are. Those are the main examples that we're going to look at in this course. Actually. 239 00:26:51.580 --> 00:26:59.830 David Stephens, Prof: we then typically also don't bother making distributional assumptions like Gaussianity or or poisson distribution, or whatever. 240 00:26:59.940 --> 00:27:04.900 David Stephens, Prof: We just think about this conditional, mean model 241 00:27:05.180 --> 00:27:17.860 David Stephens, Prof: and estimate the parameters on that basis. In this course, in this module we'll mainly focus on ordinary least squares as a method of estimation which is the sort of most basic semi parametric estimation method. 242 00:27:21.820 --> 00:27:27.939 David Stephens, Prof: So we might have, for example, that the true outcome mean is modeled by some function mu of X and Z, 243 00:27:28.860 --> 00:27:33.849 David Stephens, Prof: which we operationalize by making a parametric model. 244 00:27:35.110 --> 00:27:51.229 David Stephens, Prof: So this would be the, in a sense, non-parametric model. So we regard Mu as an infinite dimensional thing to be estimated. We make that simpler by making it explicitly parametric in terms of parameters, Theta, and then our task is to estimate Theta 245 00:27:55.780 --> 00:27:56.540 David Stephens, Prof: and 246 00:27:56.900 --> 00:28:10.900 David Stephens, Prof: to recap on something I mentioned briefly, and when I was talking about the dags, so the the real importance of the no measured, confounding assumption is that we can capture the structural model 247 00:28:11.160 --> 00:28:24.970 David Stephens, Prof: or understand the the structural model by doing an observed data analysis in particular, the structural, the structural model which really represents the relationship between the counterfactual outcome and X. 248 00:28:25.420 --> 00:28:28.010 David Stephens, Prof: When I set the treatment equal to Z 249 00:28:28.590 --> 00:28:31.749 David Stephens, Prof: and the the truly conditional model. 250 00:28:32.160 --> 00:28:34.090 David Stephens, Prof: Well, I think about the outcome 251 00:28:34.300 --> 00:28:37.179 David Stephens, Prof: when the treatment is set equal to that value. 252 00:28:38.400 --> 00:28:40.179 David Stephens, Prof: those 2 models are the same. 253 00:28:40.370 --> 00:28:46.210 David Stephens, Prof: And in a sense, that's how I I've referred to them throughout the module already. Right? 254 00:28:46.859 --> 00:28:59.430 David Stephens, Prof: That there is an equivalency. Now, technically, these 2 models do not need to be the same right. This is a counterfactual outcome, so that I could have this this generated by X in some way. 255 00:29:02.070 --> 00:29:12.109 David Stephens, Prof: But what I'm really appealing to now is to say that well, it doesn't matter how Z arises whether it arises observationally or by some intervention. 256 00:29:12.630 --> 00:29:17.649 David Stephens, Prof: The conditional distribution, the conditional effect it has on Y is the same. 257 00:29:19.660 --> 00:29:24.230 David Stephens, Prof: So I'm always going to be able to get away with this conditional outcome model. 258 00:29:25.390 --> 00:29:32.100 David Stephens, Prof: and that's a consequence, at least in part of the assumption of no mesh confounders right. 259 00:29:32.860 --> 00:29:43.200 David Stephens, Prof: The other critical thing is that I'm going to proceed on the basis that this model is correctly specified initially, that is the model that I build here 260 00:29:43.520 --> 00:29:52.229 David Stephens, Prof: correctly captures the conditional relationship between Y and X and Z. That is, it is a true representation of the structural model. 261 00:29:57.780 --> 00:30:00.249 David Stephens, Prof: and if I have that, then 262 00:30:00.710 --> 00:30:03.310 David Stephens, Prof: my worries are over. I can 263 00:30:04.110 --> 00:30:11.050 David Stephens, Prof: reproduce or sorry, produce causal quantities simply 264 00:30:11.200 --> 00:30:15.240 David Stephens, Prof: by using that conditional model in the way I'm going to explain in a minute. 265 00:30:15.530 --> 00:30:24.119 David Stephens, Prof: If that model is correctly specified and collapses the true relationship, then no special techniques are needed to estimate the causal effect. We can just use regression. 266 00:30:27.780 --> 00:30:33.380 David Stephens, Prof: So if I build, if I have this model here, the Mu Xz model 267 00:30:34.160 --> 00:30:38.260 David Stephens, Prof: correctly captures the relationship conditionally between YX and Z. 268 00:30:38.760 --> 00:30:47.170 David Stephens, Prof: Then I can just take the averaged versions of that computed at the random variable axis and the 269 00:30:47.600 --> 00:30:59.940 David Stephens, Prof: plugged in target treatment average over those. And that's going to give me an unbiased estimator of the 270 00:31:00.420 --> 00:31:02.770 David Stephens, Prof: average potential outcome at that. Z, 271 00:31:05.200 --> 00:31:08.269 David Stephens, Prof: that's a consequence of the G computation formula. 272 00:31:09.180 --> 00:31:12.059 David Stephens, Prof: I'm going to apply the G computation formula 273 00:31:12.460 --> 00:31:28.980 David Stephens, Prof: averaging over X, and then use my Monte Carlo logic and say, Well, I can estimate the expectation of YZ. By averaging the conditional expectations of Y bracket Z over the X distribution. 274 00:31:30.170 --> 00:31:36.979 David Stephens, Prof: So this estimator is an unbiased estimator of this quantity. 275 00:31:38.390 --> 00:31:43.289 David Stephens, Prof: So if Mu is a regression model, fixed regression model. Say, it's got no parameters in it yet 276 00:31:43.630 --> 00:31:47.430 David Stephens, Prof: correctly capture the conditional relationship. I just 277 00:31:47.680 --> 00:31:53.230 David Stephens, Prof: plug in the observed X's into that formula and average. 278 00:31:56.130 --> 00:31:56.790 David Stephens, Prof: Okay. 279 00:31:57.380 --> 00:32:05.860 David Stephens, Prof: so notice in this, I only use the distribution of the X's. Really, there's no modeling of the distribution of X given Z. 280 00:32:06.050 --> 00:32:08.290 David Stephens, Prof: Or indeed said, Give an axe. 281 00:32:08.420 --> 00:32:11.989 David Stephens, Prof: I'm just worried about the the X distribution. 282 00:32:13.640 --> 00:32:16.930 David Stephens, Prof: Sorry the X distribution comes into my formula. 283 00:32:18.970 --> 00:32:19.770 David Stephens, Prof: Okay. 284 00:32:22.830 --> 00:32:24.520 David Stephens, Prof: now, this doesn't quite 285 00:32:25.000 --> 00:32:29.250 David Stephens, Prof: solve the problem completely, but it gives us an idea about how we're going to proceed. 286 00:32:29.490 --> 00:32:34.989 David Stephens, Prof: What I didn't talk about here is estimation of parametric forms of 287 00:32:35.150 --> 00:32:42.720 David Stephens, Prof: Mu. So if I mean, if I'm lucky enough to know Mu of X, given Z exactly as a formula. 288 00:32:43.050 --> 00:32:46.140 David Stephens, Prof: the true structural model, then 289 00:32:46.740 --> 00:32:53.930 David Stephens, Prof: I can just use that. But more typically, I'm going to have to build a parametric model like this one and estimate the parameters. 290 00:32:55.550 --> 00:33:00.110 David Stephens, Prof: Now, I can use a similar formula to this with estimated parameters. 291 00:33:00.770 --> 00:33:03.679 David Stephens, Prof: but I have to make sure I estimate the parameters properly. 292 00:33:07.530 --> 00:33:15.079 David Stephens, Prof: and it turns out, and we'll see in a short while that there are conditions that I need to impose in order to make sure that that happens. 293 00:33:23.920 --> 00:33:28.600 David Stephens, Prof: But let's say I'm not lucky enough to be able to specify the true structural model. 294 00:33:32.660 --> 00:33:38.850 David Stephens, Prof: Okay? Then it transpires that that previous method is not going to give me the right answer. 295 00:33:41.940 --> 00:33:44.690 David Stephens, Prof: So what am I gonna do to account for the 296 00:33:45.200 --> 00:33:51.269 David Stephens, Prof: misspecification. What am I gonna do to how am I going to use a similar approach in the case? That 297 00:33:52.510 --> 00:33:53.980 David Stephens, Prof: I don't know mew exactly. 298 00:33:54.990 --> 00:33:56.832 David Stephens, Prof: Well, part of that is, is 299 00:34:02.800 --> 00:34:08.120 David Stephens, Prof: or at least understanding how to do that requires another look at the 300 00:34:10.370 --> 00:34:13.089 David Stephens, Prof: nature of confounding in the models that we've built. 301 00:34:13.929 --> 00:34:17.050 David Stephens, Prof: So in this confounding dag. 302 00:34:17.600 --> 00:34:24.220 David Stephens, Prof: The problem was that we had a direct path from Z to Y, 303 00:34:24.630 --> 00:34:27.519 David Stephens, Prof: which was giving us the causal effect, but 304 00:34:27.989 --> 00:34:30.399 David Stephens, Prof: there was also an open. 305 00:34:30.600 --> 00:34:34.299 David Stephens, Prof: undirected path from Z to y that goes through x. 306 00:34:36.239 --> 00:34:41.040 David Stephens, Prof: and what that means is that some of the effect of Z on y. 307 00:34:41.380 --> 00:34:46.680 David Stephens, Prof: which is the causal effect that I want to understand is going to be compromised 308 00:34:46.900 --> 00:34:52.590 David Stephens, Prof: by the presence of that open path. There's going to be bias due to the presence of that open path. 309 00:34:52.760 --> 00:34:56.199 David Stephens, Prof: We saw the little numerical example to illustrate that. 310 00:34:57.480 --> 00:35:00.939 David Stephens, Prof: Okay, so how do we get around that? Well. 311 00:35:01.090 --> 00:35:09.500 David Stephens, Prof: what the regression approach encourages, encourages to do is to block that path by conditioning on X right. 312 00:35:09.810 --> 00:35:17.090 David Stephens, Prof: If we condition on X, it turns out that that path from Z to Y is blocked at X, 313 00:35:18.970 --> 00:35:25.899 David Stephens, Prof: right conditioning on X renders the path from Z to Y closed on that path. 314 00:35:26.330 --> 00:35:30.669 David Stephens, Prof: So that's what that's how basically, regression is working. 315 00:35:34.440 --> 00:35:43.550 David Stephens, Prof: If we do that, then the previous type of approach would give us correct inference under correct specification. But 316 00:35:44.000 --> 00:35:48.249 David Stephens, Prof: the next problem we encounter is that we can't guarantee correct specification. 317 00:35:50.280 --> 00:35:53.800 David Stephens, Prof: We might not capture the true relationship between YX. And Z. 318 00:35:55.080 --> 00:36:01.100 David Stephens, Prof: We might instead use a different model, M. Say mistakenly, use M instead of mute. 319 00:36:01.850 --> 00:36:02.720 David Stephens, Prof: Okay? 320 00:36:02.820 --> 00:36:05.759 David Stephens, Prof: And if we do that, we're going to get the wrong estimate. 321 00:36:08.670 --> 00:36:16.279 David Stephens, Prof: Okay? So there are 2 problems we have to address, even if we get correct specification, we might have to estimate some parameters. So we need to do that correctly. 322 00:36:17.390 --> 00:36:20.290 David Stephens, Prof: But a bigger problem is that we might get the wrong aim. 323 00:36:21.600 --> 00:36:24.290 David Stephens, Prof: we might get the wrong conditional model. 324 00:36:28.370 --> 00:36:40.460 David Stephens, Prof: So both of those aspects, the idea of blocking the path successfully and getting correct specification 325 00:36:40.700 --> 00:36:49.850 David Stephens, Prof: will ultimately be addressed in our analysis through the propensity score, and I'll explain 326 00:36:50.760 --> 00:36:54.369 David Stephens, Prof: in a series of steps how we get to that point 327 00:36:54.880 --> 00:36:59.229 David Stephens, Prof: right? So hopefully, up to this point I made it clear what the issue is. 328 00:37:00.050 --> 00:37:05.929 David Stephens, Prof: why it comes from confounding, recognizing our target is in the experimental world. 329 00:37:06.350 --> 00:37:11.589 David Stephens, Prof: We only have data in the observational world. And we want to use the observational data 330 00:37:11.870 --> 00:37:14.879 David Stephens, Prof: to learn about the experimental quantity. 331 00:37:16.150 --> 00:37:21.169 David Stephens, Prof: We can do that using regression in the presence of confounding. 332 00:37:22.510 --> 00:37:27.250 David Stephens, Prof: But if we're going to use regression, we have to make sure we 333 00:37:27.380 --> 00:37:31.050 David Stephens, Prof: use the right kind of regression, the right structured model. 334 00:37:31.910 --> 00:37:35.389 David Stephens, Prof: Okay? So I'm going to go through the propensity score 335 00:37:36.450 --> 00:37:42.259 David Stephens, Prof: steps quite slowly. By the end of today we we will have seen hopefully one application of the propensity score method. 336 00:37:42.590 --> 00:37:49.920 David Stephens, Prof: and then we'll look at the more straightforward statistical approaches in the in the module tomorrow. 337 00:37:50.650 --> 00:37:51.930 David Stephens, Prof: Okay, so 338 00:37:58.650 --> 00:38:04.290 David Stephens, Prof: the 1st met thing I want to mention is balance. 339 00:38:05.980 --> 00:38:10.039 David Stephens, Prof: and this goes back to the idea that in the observational study 340 00:38:11.410 --> 00:38:17.540 David Stephens, Prof: the treated group and the untreated group are fundamentally not comparable. 341 00:38:18.280 --> 00:38:22.660 David Stephens, Prof: Right? I have a under confounding. 342 00:38:23.300 --> 00:38:29.870 David Stephens, Prof: I have a different X profile in the treated group compared to the untreated group. 343 00:38:30.300 --> 00:38:32.450 David Stephens, Prof: and that causes problems down the line. 344 00:38:35.400 --> 00:38:40.349 David Stephens, Prof: So for a randomized trial, we don't have that issue in a randomized trial. 345 00:38:40.500 --> 00:38:46.270 David Stephens, Prof: The link between X and Z is broken by the nature of the randomization. 346 00:38:50.680 --> 00:38:55.239 David Stephens, Prof: and in that case, under and under randomized treatment. 347 00:38:55.820 --> 00:38:59.759 David Stephens, Prof: We can just use the 2 group comparison in the usual way. Everything is fine. 348 00:39:04.360 --> 00:39:13.290 David Stephens, Prof: So the important feature in the randomized trial is that the X and Z structure is very special. X and Z are independent. 349 00:39:13.570 --> 00:39:20.689 David Stephens, Prof: Probabilistically right. I get the same X profile. In the 1st group. 350 00:39:21.300 --> 00:39:30.080 David Stephens, Prof: Z equals one or z equals 0, let's say, as in the other group, right? So the 351 00:39:31.320 --> 00:39:36.240 David Stephens, Prof: distribution of the x's when Z equals one 352 00:39:37.650 --> 00:39:42.670 David Stephens, Prof: is the same as the distribution of the X's when Z equals 0 right? 353 00:39:43.860 --> 00:39:51.039 David Stephens, Prof: And that's purely due to the randomization procedure. I've collected this large bunch of individuals from the population. They've all come in 354 00:39:51.160 --> 00:39:54.279 David Stephens, Prof: carrying their X characteristics with them. 355 00:39:54.840 --> 00:39:58.650 David Stephens, Prof: But I've ignored the X characteristics when I've made the treatment allocation. 356 00:40:00.500 --> 00:40:03.080 David Stephens, Prof: So by that X and Z are independent. 357 00:40:05.230 --> 00:40:08.350 David Stephens, Prof: So that means that the conditional distribution of X given Z. 358 00:40:08.480 --> 00:40:09.540 David Stephens, Prof: Differs. 359 00:40:10.760 --> 00:40:17.389 David Stephens, Prof: Sorry doesn't, doesn't differ in the randomized study, irrespective of whether Z is one or 0 360 00:40:19.810 --> 00:40:25.539 David Stephens, Prof: in the case of a binary confound. Like the case we saw before the probability that X equals one 361 00:40:26.070 --> 00:40:32.750 David Stephens, Prof: given Z equals. One is the same as the probability that X equals one given Z equals 0, there's no difference. 362 00:40:33.250 --> 00:40:48.060 David Stephens, Prof: and the term that's sometimes used is balance. We say that the X's are balanced in the Z equals one group and the Z equals 0 group, that is, if you didn't say a box plot or a histogram of the X's in the 2 groups. 363 00:40:48.220 --> 00:40:52.630 David Stephens, Prof: they would be essentially indistinguishable right. 364 00:40:53.010 --> 00:40:55.729 David Stephens, Prof: And this is really getting at the heart of the fact that 365 00:40:57.750 --> 00:41:02.319 David Stephens, Prof: in the randomized study the groups are comparable in terms of their x's 366 00:41:05.080 --> 00:41:07.779 David Stephens, Prof: and actions that are independent by construction. 367 00:41:08.700 --> 00:41:16.089 David Stephens, Prof: But in the observational study I don't have that in the observational study, as we saw the conditional distribution of X depends on Z. 368 00:41:17.040 --> 00:41:24.480 David Stephens, Prof: So the profile of the X's and the Z equals one group is different from the profile of the X's in the Z equals 0 group. 369 00:41:25.200 --> 00:41:29.139 David Stephens, Prof: In the binary case, the probability that X equals one given Z equals one 370 00:41:29.510 --> 00:41:33.879 David Stephens, Prof: is not the same as the probability that X equals one given Z equals 0. 371 00:41:35.710 --> 00:41:42.649 David Stephens, Prof: If you did a histogram or a box plot of the X's in the treatment group and the No treatment group, they would look different. 372 00:41:45.210 --> 00:41:51.139 David Stephens, Prof: So if you see that, and if you also know that X influences Y, 373 00:41:52.350 --> 00:41:58.390 David Stephens, Prof: then you can't get at the causal effect of Z, simply by comparing the group means for the 2 groups. 374 00:41:59.830 --> 00:42:06.380 David Stephens, Prof: This imbalance renders direct comparison comparison of the outcomes in the 2 groups impossible. 375 00:42:08.640 --> 00:42:11.039 David Stephens, Prof: Fair comparison impossible, anyway. 376 00:42:12.080 --> 00:42:12.890 David Stephens, Prof: Right. 377 00:42:13.380 --> 00:42:16.780 David Stephens, Prof: So the pro, the the difference in the X profile 378 00:42:16.920 --> 00:42:21.629 David Stephens, Prof: is seriously problematic for causal conclusions. 379 00:42:26.180 --> 00:42:27.990 David Stephens, Prof: So how do we fix that 380 00:42:29.690 --> 00:42:38.549 David Stephens, Prof: well, conditioning on X is one version. That's what we saw before. That's what we were referring to before conditioning on X to block the problematic pathway 381 00:42:38.940 --> 00:42:41.350 David Stephens, Prof: between Z and Y. That goes through X 382 00:42:43.200 --> 00:42:46.089 David Stephens, Prof: in a sort of probabilistic sense that works. 383 00:42:47.210 --> 00:42:52.129 David Stephens, Prof: we might still have to operationalize it statistically. But it still works. 384 00:42:53.070 --> 00:42:59.480 David Stephens, Prof: But let's say we can't do that effectively. 385 00:42:59.850 --> 00:43:00.790 David Stephens, Prof: We 386 00:43:01.100 --> 00:43:06.499 David Stephens, Prof: need to rely on correct specification. But let's say we're not willing to try to make a correct specification. 387 00:43:07.260 --> 00:43:12.650 David Stephens, Prof: Let's look more deeply at the structure of the that conditioning argument. 388 00:43:14.370 --> 00:43:20.840 David Stephens, Prof: Well, we know we want X and Z. Independent to mimic the randomized study. 389 00:43:20.950 --> 00:43:26.739 David Stephens, Prof: But in general that's not true. In general, the distribution of X depends on Z 390 00:43:32.730 --> 00:43:35.919 David Stephens, Prof: to build up the picture of how we're going to construct a solution. 391 00:43:36.380 --> 00:43:44.240 David Stephens, Prof: I'm gonna make sort of start making some sort of related assumptions. 392 00:43:44.800 --> 00:43:51.530 David Stephens, Prof: So 1st of all, the idea of independence really is one of global balance. 393 00:43:54.520 --> 00:43:57.729 David Stephens, Prof: that is, across the whole sample. 394 00:43:58.430 --> 00:44:04.379 David Stephens, Prof: I need the X distribution for the treated group to look like the X distribution for the untreated group. 395 00:44:05.560 --> 00:44:11.240 David Stephens, Prof: But let's say I don't have that. But suppose that it is possible for some strata of the X's. 396 00:44:11.530 --> 00:44:17.760 David Stephens, Prof: that is, if Curly S is some identified stratum of the sample space. 397 00:44:18.760 --> 00:44:21.849 David Stephens, Prof: let's say an age group or something like that. 398 00:44:22.520 --> 00:44:26.350 David Stephens, Prof: Then within for people, for people within that stratum 399 00:44:26.710 --> 00:44:28.699 David Stephens, Prof: suppose that we do have balance. 400 00:44:29.260 --> 00:44:38.369 David Stephens, Prof: So if you looked at the distribution of X given Z. But only restricted attention for X in a certain subgroup 401 00:44:38.600 --> 00:44:43.660 David Stephens, Prof: of individuals, and in that subgroup there was no 402 00:44:44.250 --> 00:44:52.060 David Stephens, Prof: dependence on Z. So you take so, rather than look at age group 20 to 80, or whatever 403 00:44:52.420 --> 00:45:00.499 David Stephens, Prof: where there might not be global balance in the 2 treatment groups. Let's say you only looked at ages between 45 and 55, 404 00:45:01.890 --> 00:45:06.779 David Stephens, Prof: and then drew the histogram or the box plot for the 2 groups. And you saw that actually 405 00:45:07.490 --> 00:45:12.980 David Stephens, Prof: the treated group looked similar to the untreated group within that stratum of age. 406 00:45:13.850 --> 00:45:17.220 David Stephens, Prof: Okay, so we might think of that as local balance. 407 00:45:22.800 --> 00:45:32.560 David Stephens, Prof: So what we could do then is, oh, that's fine. We'll just say we'll just redefine the problem and say, we want the causal effect in that group. 408 00:45:33.840 --> 00:45:43.840 David Stephens, Prof: So within that stratum, we're back in the balanced world, we're back in the randomized world. It looks as if treatment is randomized, even if it even if it wasn't right. 409 00:45:44.500 --> 00:45:48.319 David Stephens, Prof: So for Age Group 45 to 55. You really can't tell 410 00:45:49.364 --> 00:45:55.709 David Stephens, Prof: any difference between the profiles and the X's and the X's in the treatment group and the non-treatment group. 411 00:45:57.010 --> 00:46:00.870 David Stephens, Prof: So what you could do is just restrict attention to causal statements for that age group. 412 00:46:01.580 --> 00:46:08.120 David Stephens, Prof: You could say, Well, okay, the causal effect of treatment is basically the difference in the outcomes 413 00:46:08.600 --> 00:46:10.850 David Stephens, Prof: for individuals in those 2 groups. 414 00:46:13.800 --> 00:46:21.110 David Stephens, Prof: So that's a limiting sort of 415 00:46:21.350 --> 00:46:28.760 David Stephens, Prof: assumption or sorry. It's a limiting conclusion. Limited conclusion, because we don't want 416 00:46:29.450 --> 00:46:35.080 David Stephens, Prof: conditional on a stratum conclusions. We want population, wide conclusions. 417 00:46:36.270 --> 00:46:40.599 David Stephens, Prof: But it it's gonna allow me to illustrate how the construction 418 00:46:40.780 --> 00:46:48.879 David Stephens, Prof: can be modified to to really get at the causal effects from general observational studies. 419 00:46:50.740 --> 00:46:55.539 David Stephens, Prof: Okay, so let's say, we have this local balance. What I could do is estimate the local causal effect 420 00:46:57.500 --> 00:47:04.190 David Stephens, Prof: and an extreme trivial case of this is, let's say that the confider only took one value x 0. 421 00:47:04.810 --> 00:47:11.899 David Stephens, Prof: Then, even if I didn't randomly assign treatment, it would look as if I did right, because everybody 422 00:47:12.490 --> 00:47:15.809 David Stephens, Prof: in the population has X equal to X 0. 423 00:47:18.430 --> 00:47:24.620 David Stephens, Prof: So even if X does influence X does influence 424 00:47:25.060 --> 00:47:28.629 David Stephens, Prof: the 2 metallication. It looks as if it doesn't. 425 00:47:31.760 --> 00:47:35.079 David Stephens, Prof: So in that case. 426 00:47:36.440 --> 00:47:43.720 David Stephens, Prof: we know that the 2 groups Treatment Group and the Untreatment group are the No treatment group are comparable right because everybody gets x 0. 427 00:47:46.290 --> 00:47:52.830 David Stephens, Prof: So any differences between the outcomes in the 2 groups, any systematic differences must be due to the treatment difference. 428 00:47:55.800 --> 00:48:09.069 David Stephens, Prof: So this is an unrealistic example, right? I mean, because I mean, if we were in this case, then it's almost as if we weren't accounting for the effect of X at all right, but it's trying to get at the point that 429 00:48:09.970 --> 00:48:12.440 David Stephens, Prof: we might be able to think of strata 430 00:48:12.990 --> 00:48:17.049 David Stephens, Prof: of the X's where this approximate balance did hold. 431 00:48:17.470 --> 00:48:19.519 David Stephens, Prof: We might observe that in the sample. 432 00:48:22.450 --> 00:48:32.990 David Stephens, Prof: if we had X's which were discrete. So, taking multi-valued, discrete values, then 433 00:48:33.090 --> 00:48:39.880 David Stephens, Prof: what we could do is to say, well, okay, let's look for every x 0, sorry. X, where we have X equal to x 0, 434 00:48:40.390 --> 00:48:46.269 David Stephens, Prof: and every individual where X is equal to x. 1, and every individual where X is equal to x, 2, 435 00:48:46.790 --> 00:48:50.700 David Stephens, Prof: right? So form strata by defining. 436 00:48:51.690 --> 00:48:54.669 David Stephens, Prof: defining them in terms of the value that X takes. 437 00:48:55.880 --> 00:49:03.920 David Stephens, Prof: Okay? So then we'd have a collection of precisely matched individuals. Right? We'd have all the individuals that had 438 00:49:04.430 --> 00:49:11.009 David Stephens, Prof: X equal to X 0 in one subgroup. All the individuals that had X equal to x 1 in the second group. 439 00:49:13.590 --> 00:49:19.760 David Stephens, Prof: And if we're lucky enough to have treated and untreated individuals in each of those groups. 440 00:49:20.210 --> 00:49:24.040 David Stephens, Prof: then we can do a causal comparison in each of those groups. 441 00:49:26.280 --> 00:49:34.960 David Stephens, Prof: So it have. Let's say we've got K. Values of the of the for covariate the confounder. 442 00:49:36.260 --> 00:49:41.069 David Stephens, Prof: We can look at a causal effect for each of those K values. 443 00:49:41.620 --> 00:49:48.370 David Stephens, Prof: and then at the end combine them some way right? 444 00:49:48.850 --> 00:49:51.110 David Stephens, Prof: So if we had a large sample 445 00:49:52.530 --> 00:49:57.780 David Stephens, Prof: we'd have enough information to estimate the causal effect in each of the strata. 446 00:49:57.970 --> 00:50:00.880 David Stephens, Prof: and then at the end we'd have to combine them in some way. 447 00:50:02.710 --> 00:50:08.129 David Stephens, Prof: And the compact, the combination that we would use is really just a a. 448 00:50:08.940 --> 00:50:17.179 David Stephens, Prof: an iterated expectation type calculation. Right? So let's say we had X's fall into a set of strata. Sk 449 00:50:17.620 --> 00:50:19.400 David Stephens, Prof: K equals one up to Big K. 450 00:50:19.660 --> 00:50:23.249 David Stephens, Prof: We just look at the causal effect within that stratum 451 00:50:25.520 --> 00:50:31.909 David Stephens, Prof: weight that by the probability of being in that stratum and then aggregate overall strata. 452 00:50:33.750 --> 00:50:34.490 David Stephens, Prof: Okay? 453 00:50:35.750 --> 00:50:41.159 David Stephens, Prof: And the advantage of this is, let's say, in this interior part of the calculation. 454 00:50:41.390 --> 00:50:43.550 David Stephens, Prof: for X is in this stratum. 455 00:50:44.070 --> 00:50:45.990 David Stephens, Prof: Let's say we had balance. 456 00:50:46.860 --> 00:50:52.030 David Stephens, Prof: so you couldn't tell the difference between the treated and untreated groups within that stratum. 457 00:50:54.930 --> 00:50:56.599 David Stephens, Prof: So actually in the discrete. 458 00:50:56.710 --> 00:51:01.140 David Stephens, Prof: Confound a case! You would have that right because everybody gets X equal to Xk. 459 00:51:01.740 --> 00:51:03.800 David Stephens, Prof: Right now, this estimate. 460 00:51:04.270 --> 00:51:10.680 David Stephens, Prof: or sorry the estimated version of this which we could carry out, using just a sample mean calculation. 461 00:51:16.050 --> 00:51:19.369 David Stephens, Prof: that would be a local estimate of the causal effect. 462 00:51:20.230 --> 00:51:28.990 David Stephens, Prof: And then I could do a weighted average of those stratum specific estimates to get an overall estimate. 463 00:51:36.440 --> 00:51:43.490 David Stephens, Prof: I would get this an estimate of this quantity just just by estimating the proportion of individuals that fall into this stratum. 464 00:51:44.840 --> 00:51:45.590 David Stephens, Prof: Right? 465 00:51:45.700 --> 00:51:48.190 David Stephens, Prof: So then, I've sort of solved the problem. 466 00:51:48.510 --> 00:51:50.959 David Stephens, Prof: I've done it in a non-parametric way 467 00:51:52.410 --> 00:51:59.389 David Stephens, Prof: by combining weighted local estimates to get an overall causal effect estimate. 468 00:52:04.330 --> 00:52:11.520 David Stephens, Prof: So I think that's a pretty smart way to do it. Actually, you're not reliant on any correct model specification 469 00:52:11.640 --> 00:52:13.849 David Stephens, Prof: like you would be in a regression model. 470 00:52:16.440 --> 00:52:26.820 David Stephens, Prof: They're awesome things that consider here. Of course, some things to take into account. 471 00:52:30.010 --> 00:52:31.689 David Stephens, Prof: I do need to have 472 00:52:34.740 --> 00:52:37.239 David Stephens, Prof: a belief that within each stratum 473 00:52:41.810 --> 00:52:46.000 David Stephens, Prof: I can. I have enough data to estimate the the difference here. 474 00:52:46.160 --> 00:52:50.430 David Stephens, Prof: so I need a large enough sample size per strata per stratum 475 00:52:55.360 --> 00:53:05.170 David Stephens, Prof: and a more challenging situation arises. If I have continuous 476 00:53:05.600 --> 00:53:11.400 David Stephens, Prof: covariance, so if I've got a discrete covariate or confounder, then 477 00:53:11.510 --> 00:53:17.230 David Stephens, Prof: forming the strata is straightforward. I just take the individual values of the variable 478 00:53:18.055 --> 00:53:26.690 David Stephens, Prof: of the X to to to define those strata. If I have continuous confounders, though where X is varying on some continuous range. 479 00:53:26.950 --> 00:53:30.519 David Stephens, Prof: Then I'm not really in a position to do that. 480 00:53:32.457 --> 00:53:37.510 David Stephens, Prof: I can still think about forming strata. So let's say, I've got s. 1 through. Sk again. 481 00:53:38.390 --> 00:53:41.130 David Stephens, Prof: I can still apply the same formula. 482 00:53:41.860 --> 00:53:46.910 David Stephens, Prof: but I have to more patently, obviously assume that 483 00:53:50.590 --> 00:53:54.270 David Stephens, Prof: within a stratum where the axes differ slightly. 484 00:53:56.540 --> 00:54:01.499 David Stephens, Prof: I have comparability between the treated and untreated groups. 485 00:54:03.050 --> 00:54:09.670 David Stephens, Prof: And also typically, I need a model for the average treatment effect difference within that stratum 486 00:54:10.380 --> 00:54:18.300 David Stephens, Prof: right, and I could do a simple 2 group comparison again. But I then have to assume that the outcome didn't depend on X within that stratum. 487 00:54:19.380 --> 00:54:27.489 David Stephens, Prof: If the if the effect was different in different strata. That's not problematic. But I have to assume that the effect of treatment is constant. 488 00:54:27.950 --> 00:54:31.870 David Stephens, Prof: at least for X within this strata stratum. Sorry. 489 00:54:33.540 --> 00:54:40.840 David Stephens, Prof: Okay. The other difficulty with continuous confounders is that this collection of strata 490 00:54:41.270 --> 00:54:43.249 David Stephens, Prof: might not cover the whole space. 491 00:54:47.840 --> 00:54:50.770 David Stephens, Prof: but in principle it gives me a way of approaching it. 492 00:54:51.030 --> 00:54:53.209 David Stephens, Prof: From a practical point of view. 493 00:54:53.360 --> 00:54:57.589 David Stephens, Prof: I can still form the same sort of estimator 494 00:54:58.590 --> 00:55:02.800 David Stephens, Prof: as I did for the discrete confounder case in the continuous case. 495 00:55:10.370 --> 00:55:15.630 David Stephens, Prof: so that naive approach can be quite useful, palatable, actually. 496 00:55:16.120 --> 00:55:19.140 David Stephens, Prof: But there are some assumptions that go along with it. 497 00:55:21.550 --> 00:55:25.110 David Stephens, Prof: So in the continuous case 498 00:55:26.500 --> 00:55:34.580 David Stephens, Prof: I essentially have to assume. There's no effect of X. If I'm just going to do a 2 group comparison within this stratum, I have to assume that within that stratum 499 00:55:34.990 --> 00:55:37.030 David Stephens, Prof: X may vary a little bit. 500 00:55:37.760 --> 00:55:40.730 David Stephens, Prof: So you take Age Group 501 00:55:40.860 --> 00:55:46.349 David Stephens, Prof: 45 years, or whatever, then it doesn't matter where you are in that age year. 502 00:55:47.460 --> 00:55:49.791 David Stephens, Prof: The effect of of age is 503 00:55:51.220 --> 00:55:55.460 David Stephens, Prof: It does not. Is is negligible on the, on the outcome. 504 00:55:56.530 --> 00:55:59.459 David Stephens, Prof: So that's a strongish assumption. 505 00:56:00.308 --> 00:56:10.430 David Stephens, Prof: You have to, therefore assume really, that individuals that fall within a stratum are essentially exchangeable, and 506 00:56:11.540 --> 00:56:13.840 David Stephens, Prof: that could be a strong issue. Assumption. 507 00:56:15.621 --> 00:56:17.978 David Stephens, Prof: We no longer are doing 508 00:56:18.650 --> 00:56:27.510 David Stephens, Prof: exact matching of the individuals. If we had a discrete confounder, then we know that everybody gets a particular X value. 509 00:56:27.700 --> 00:56:38.610 David Stephens, Prof: So we know that they're exactly matched, whereas in the continuous case you might have people that have slightly different X's, in which case they're not exactly matched, but their X's are close together. So we assume that they're comparable. 510 00:56:41.659 --> 00:56:51.539 David Stephens, Prof: That's only if we refer to the single X case, typically, we'll have X being multivariate. In which case this is this, the defining, these strata is much more complicated. 511 00:56:52.497 --> 00:56:57.149 David Stephens, Prof: We might have, therefore, the need to construct a large number of strata 512 00:57:00.570 --> 00:57:07.410 David Stephens, Prof: and what that might lead us to is the inability to estimate the causal effect within a stratum. 513 00:57:10.030 --> 00:57:15.360 David Stephens, Prof: So in the continuous case where we have a lot of covariates. This method. 514 00:57:15.720 --> 00:57:27.630 David Stephens, Prof: at least in principle, is promising. But it's going to be hard to implement. We can't do this exact sort of matching approach. So we need a we need to think of another way to apply the same sort of 515 00:57:29.210 --> 00:57:30.280 David Stephens, Prof: strategy. 516 00:57:33.710 --> 00:57:48.610 David Stephens, Prof: And I'm going to take a 5 min break now and then, when we finish today, I'm going to show what role the propensity score plays in facilitating precisely that kind of stratification and then give an indication of how else it can be used in correction. 517 00:57:48.930 --> 00:57:51.779 David Stephens, Prof: Right? So we'll pick up again at 518 00:57:52.090 --> 00:57:55.729 David Stephens, Prof: 32 min past. So 5 min from now. 519 01:02:10.490 --> 01:02:16.270 David Stephens, Prof: Okay, then, to pick back up with the final push. Today 520 01:02:17.360 --> 01:02:20.909 David Stephens, Prof: we're going to see how the propensity score can be used to 521 01:02:21.440 --> 01:02:27.310 David Stephens, Prof: provide a mechanism for precisely the kind of balance 522 01:02:27.880 --> 01:02:31.060 David Stephens, Prof: the stratification kind of approach that we've just seen. 523 01:02:31.330 --> 01:02:32.650 David Stephens, Prof: Illustrated 524 01:02:35.720 --> 01:02:40.360 David Stephens, Prof: part of the goal really is to mimic the structure that we get in a randomized study 525 01:02:41.320 --> 01:02:44.520 David Stephens, Prof: so that we can carry out genuinely this 526 01:02:45.030 --> 01:02:48.200 David Stephens, Prof: direct comparison between treated and untreated groups. 527 01:02:48.730 --> 01:02:55.549 David Stephens, Prof: We know it's not possible globally in the general in the general confounding case, but 528 01:02:56.110 --> 01:03:02.160 David Stephens, Prof: we know that it possibly can be achieved locally within strata, and 529 01:03:03.040 --> 01:03:14.180 David Stephens, Prof: we saw that outlined before the discrete, covariate, single discrete, covariate matching on the individual strata is sorry on the individual. X values is possible. 530 01:03:14.350 --> 01:03:23.169 David Stephens, Prof: but we might need a large data set if the covariates, the compounders are continuous, then, or high dimensional, then defining those strata is 531 01:03:23.320 --> 01:03:25.060 David Stephens, Prof: considerably more problematic. 532 01:03:27.760 --> 01:03:32.860 David Stephens, Prof: So let's think about the structure of the problem again. 533 01:03:33.130 --> 01:03:39.720 David Stephens, Prof: So our job our task now is to define strata that 534 01:03:42.420 --> 01:03:47.429 David Stephens, Prof: yield balance in the way that we've described it, or 535 01:03:48.950 --> 01:03:55.709 David Stephens, Prof: thinking about in probabilistic terms, so that within those strata X and Z are independent. 536 01:03:56.720 --> 01:04:05.019 David Stephens, Prof: and I use the term independent loosely there, because independence is a sort of global feature of the X and Z distribution. But 537 01:04:05.527 --> 01:04:11.559 David Stephens, Prof: essentially, what I'm looking for is this equivalence of the conditional distribution between X and Z 538 01:04:12.500 --> 01:04:16.090 David Stephens, Prof: within the strata of X that I'm identifying. 539 01:04:19.390 --> 01:04:26.239 David Stephens, Prof: So previously I did that for univariate. X showed how to do it, but 540 01:04:26.490 --> 01:04:33.040 David Stephens, Prof: in general the X's won't be univariate. They'll be high, dimensional, and continuous. So 541 01:04:33.360 --> 01:04:44.010 David Stephens, Prof: defining the strata for this is a more challenging step. But let's suppose we can do that in terms of some statistics, some summary of some summary of the X's. 542 01:04:44.130 --> 01:04:47.190 David Stephens, Prof: I'm going to write that as ex, right? 543 01:04:47.640 --> 01:04:51.660 David Stephens, Prof: So this is just some deterministic mapping of the X's. 544 01:04:52.940 --> 01:04:54.189 David Stephens, Prof: And I'm using 545 01:04:55.620 --> 01:05:04.719 David Stephens, Prof: for reasons that will become useful later on. I'm using a sans serif X, there to define that function. So that's a function of the X's. 546 01:05:07.440 --> 01:05:15.810 David Stephens, Prof: And then what we're going to do is to consider the conditional distribution of X given Z 547 01:05:16.670 --> 01:05:21.650 David Stephens, Prof: for a particular value for that statistic. 548 01:05:22.630 --> 01:05:27.410 David Stephens, Prof: So it's a bit like stratification by a sufficient statistic, if you like. 549 01:05:27.910 --> 01:05:33.209 David Stephens, Prof: What is the distribution of oh, what we're going to consider here is the distribution of X 550 01:05:34.280 --> 01:05:37.300 David Stephens, Prof: by Z group within 551 01:05:37.920 --> 01:05:48.649 David Stephens, Prof: a set of values where the statistic takes the value. Little. E. So again, the notation here is that this is the a statistic, a random, variable in its own right. 552 01:05:48.930 --> 01:05:51.889 David Stephens, Prof: And this is a particular numerical value. 553 01:05:53.640 --> 01:05:57.760 David Stephens, Prof: So I'm choosing the function. 554 01:05:58.160 --> 01:06:03.289 David Stephens, Prof: And I'm saying, well, that function has got to be equal to a particular value to define the stratum. 555 01:06:04.860 --> 01:06:09.450 David Stephens, Prof: Okay? And what I'm the action. I'm looking 4 556 01:06:09.962 --> 01:06:16.329 David Stephens, Prof: or the result I'm looking for here is that when I do that conditioning X and Z 557 01:06:16.650 --> 01:06:19.310 David Stephens, Prof: are independent, that is, conditional on E. 558 01:06:20.330 --> 01:06:22.060 David Stephens, Prof: X and Z are independent. 559 01:06:24.160 --> 01:06:27.140 David Stephens, Prof: What I can then do is to look within strata of E, 560 01:06:27.670 --> 01:06:30.229 David Stephens, Prof: and compare the treated and untreated groups. 561 01:06:31.640 --> 01:06:38.669 David Stephens, Prof: Okay. So the only difference here is that I'm now taking a a function of the X's rather than the individual axes 562 01:06:43.600 --> 01:06:47.260 David Stephens, Prof: for conditional independence of X and Z. Given E. 563 01:06:49.500 --> 01:06:53.000 David Stephens, Prof: We require that the conditional distribution given A 564 01:06:53.680 --> 01:06:56.990 David Stephens, Prof: of X given Z is simply 565 01:06:57.290 --> 01:07:04.430 David Stephens, Prof: dependent on E, so that is, conditional distribution of x given Z and e is equivalent to the distribution of X given E. 566 01:07:05.250 --> 01:07:12.249 David Stephens, Prof: Right doesn't depend on Z. That's 1 way of talking about independence conditionally. The other way is to flip the 567 01:07:12.420 --> 01:07:16.930 David Stephens, Prof: X and Z. So say the conditional distribution of Z given X 568 01:07:18.540 --> 01:07:26.170 David Stephens, Prof: is independent of EZ. Given x, and E is independent of right. So I'm taking A, 569 01:07:27.630 --> 01:07:32.650 David Stephens, Prof: I'm taking a summary of the X's through E, 570 01:07:32.970 --> 01:07:38.340 David Stephens, Prof: and I'm saying, Well, there are many possible X's that could map onto that summary value. 571 01:07:40.080 --> 01:07:45.859 David Stephens, Prof: But if I look within strata defined by that summary value that breaks the dependence between X and Z. 572 01:07:49.670 --> 01:07:57.099 David Stephens, Prof: Alright. So for this to happen, I need both of these 2 things to hold. That's sort of an equivalence between the 2. I can view them either way around. 573 01:07:58.550 --> 01:08:05.720 David Stephens, Prof: So because Z is binary. If I take the second equation here, then. 574 01:08:06.743 --> 01:08:13.770 David Stephens, Prof: this distribution of Z given X and e, or was that given E equivalently. 575 01:08:14.480 --> 01:08:16.830 David Stephens, Prof: must be a Bernoulli distribution. 576 01:08:17.090 --> 01:08:26.890 David Stephens, Prof: That's the only form of distribution for a binary random, variable, you have the probability that Z takes the value one and the probability that Z takes the value. 0. 577 01:08:33.430 --> 01:08:40.189 David Stephens, Prof: Okay, so if it's a Bernoulli distribution, and 578 01:08:41.720 --> 01:08:46.129 David Stephens, Prof: we know it must look like this. We must have that dependent on X 579 01:08:47.050 --> 01:08:49.689 David Stephens, Prof: and E. We only need to know. E, 580 01:08:50.250 --> 01:08:57.870 David Stephens, Prof: then the Bernoulli distribution. Much must look like this. Right? So the probability that Z given E 581 01:08:58.960 --> 01:09:05.399 David Stephens, Prof: that we're looking for must take this form must be a probability that depends on E, possibly 582 01:09:06.060 --> 01:09:10.870 David Stephens, Prof: technically the powers that one minus that probability to the power one minus said 583 01:09:11.250 --> 01:09:14.399 David Stephens, Prof: right? So that is binary. That's the only way it can work. 584 01:09:16.290 --> 01:09:24.260 David Stephens, Prof: So z given E must be a Bernoulli, where the probability depends on E all right. 585 01:09:29.410 --> 01:09:34.000 David Stephens, Prof: but also, of course, in the way we've defined it. E of X is a function of X. 586 01:09:35.319 --> 01:09:39.179 David Stephens, Prof: So if I know XI know E of X 587 01:09:39.640 --> 01:09:43.410 David Stephens, Prof: right, because E is a deterministic mapping, it's just some summary. 588 01:09:45.300 --> 01:09:48.530 David Stephens, Prof: So if I think about this second equation again, here. 589 01:09:49.479 --> 01:09:55.209 David Stephens, Prof: then, what I have is that f of z 590 01:09:55.730 --> 01:09:58.509 David Stephens, Prof: given x and e of X 591 01:09:58.680 --> 01:10:03.750 David Stephens, Prof: must be by definition. F of Z given X. 592 01:10:07.030 --> 01:10:08.490 David Stephens, Prof: If I choose 593 01:10:09.160 --> 01:10:20.219 David Stephens, Prof: the value E here correctly, so that that restriction provides a constraint basically right? So the functional forms of these 2 must be the same. 594 01:10:23.440 --> 01:10:30.920 David Stephens, Prof: provided that that value I'm conditioning on here is what you get when you map this X value through the E function. 595 01:10:32.490 --> 01:10:38.690 David Stephens, Prof: All right. So in summary, what that means is that F of Z given x. 596 01:10:39.670 --> 01:10:45.370 David Stephens, Prof: which must be the same as F of z. Given X and E must take this form 597 01:10:46.270 --> 01:10:50.069 David Stephens, Prof: right, putting those 2 previous steps to get there. 598 01:10:53.150 --> 01:10:58.450 David Stephens, Prof: And one way to read this is to say, well, the conditional distribution of Z given X 599 01:10:59.330 --> 01:11:07.000 David Stephens, Prof: must be entirely contained, or must be entirely specifiable through E. Of x. 600 01:11:08.040 --> 01:11:13.500 David Stephens, Prof: So again, this is a bit like sufficiency. Right. It's not quite sufficiency, because sufficiency is about 601 01:11:14.040 --> 01:11:18.350 David Stephens, Prof: parameters and so on. This is not. This is about the distribution right? 602 01:11:18.840 --> 01:11:26.160 David Stephens, Prof: But what it's saying is that the information that we gain through E is sufficient to specify 603 01:11:26.380 --> 01:11:28.539 David Stephens, Prof: the distribution of Z given x. 604 01:11:30.670 --> 01:11:33.589 David Stephens, Prof: So that if I hold e. Constant. 605 01:11:37.460 --> 01:11:43.819 David Stephens, Prof: I get the same value of the conditional distribution of Z given X for all that. 606 01:11:44.210 --> 01:11:46.369 David Stephens, Prof: such that that constraint holds. 607 01:11:48.890 --> 01:11:53.310 David Stephens, Prof: So there's a few things to think about in that. But the idea is that 608 01:11:54.900 --> 01:12:02.200 David Stephens, Prof: I need to find E such that the distribution of Z given X is characterized by E. 609 01:12:06.890 --> 01:12:10.830 David Stephens, Prof: So it's like a sufficient summary of the information contained in the axis. 610 01:12:13.830 --> 01:12:16.719 David Stephens, Prof: Fortunately, I can find an easy function that does that. 611 01:12:17.260 --> 01:12:20.359 David Stephens, Prof: I can just choose E to be 612 01:12:20.800 --> 01:12:23.890 David Stephens, Prof: the probability that Z takes the value one given X, 613 01:12:29.280 --> 01:12:32.250 David Stephens, Prof: and then I can take P to be the identity function. 614 01:12:32.630 --> 01:12:44.520 David Stephens, Prof: and just say that well, I must have E such that oh, sorry I must have, so I then have that the distribution of Z given X, which, if you remember, is this, Bernoulli 615 01:12:44.630 --> 01:12:49.340 David Stephens, Prof: must be E to the z 1 minus E to the one minus z. 616 01:12:52.200 --> 01:12:56.190 David Stephens, Prof: where e is precisely this mapped version of X 617 01:12:59.830 --> 01:13:00.610 David Stephens, Prof: nice. 618 01:13:00.860 --> 01:13:07.390 David Stephens, Prof: So by construction. Here I found a statistic that I can condition upon 619 01:13:08.180 --> 01:13:11.780 David Stephens, Prof: to render Z and X independent. 620 01:13:13.380 --> 01:13:17.179 David Stephens, Prof: Conditionally, Z and x are independent. 621 01:13:20.950 --> 01:13:24.209 David Stephens, Prof: Actually, I choose P here to be the identity. 622 01:13:24.781 --> 01:13:29.670 David Stephens, Prof: Actually, I could choose any monotonic transformation of this E, and it would give me the same construction. 623 01:13:32.040 --> 01:13:35.410 David Stephens, Prof: All right. So the the statistic that I'm after. 624 01:13:35.950 --> 01:13:38.569 David Stephens, Prof: It's the probability that Z equals one given X. 625 01:13:42.000 --> 01:13:44.090 David Stephens, Prof: That function is the propensity score. 626 01:13:47.800 --> 01:13:56.380 David Stephens, Prof: It's the. It's the statistic which is the summary of the X values such that 627 01:13:57.000 --> 01:14:01.479 David Stephens, Prof: it captures the probability that Z equals one given X in this binary case. 628 01:14:02.730 --> 01:14:06.210 David Stephens, Prof: And if I use that statistic conditional on 629 01:14:06.680 --> 01:14:10.480 David Stephens, Prof: the value of that statistic, Z and X become independent. 630 01:14:12.530 --> 01:14:17.060 David Stephens, Prof: right? So the propensity score is precisely a balancing score 631 01:14:18.130 --> 01:14:21.980 David Stephens, Prof: conditional on E of XZ. And x are independent. 632 01:14:23.800 --> 01:14:26.700 David Stephens, Prof: meaning that if I stratify on E. 633 01:14:26.960 --> 01:14:31.990 David Stephens, Prof: I can do local causal comparisons within strata of E. 634 01:14:35.420 --> 01:14:42.429 David Stephens, Prof: The other important thing here is that even if X is high, dimensional E of X is scalar 635 01:14:43.120 --> 01:14:48.380 David Stephens, Prof: right? It is precisely the probability that Z equals one given X. So it's like, I'm building a 636 01:14:48.790 --> 01:14:50.729 David Stephens, Prof: prediction model for Z. 637 01:14:50.840 --> 01:14:58.070 David Stephens, Prof: Give an X so something like a logistic regression. Say, right, I'm building that model. 638 01:14:59.150 --> 01:15:01.949 David Stephens, Prof: And then I take the fitted values from that model 639 01:15:02.580 --> 01:15:06.969 David Stephens, Prof: to get me the the ease and then conditional on those ease I 640 01:15:09.610 --> 01:15:12.610 David Stephens, Prof: have Z independent of x within those strata. 641 01:15:15.690 --> 01:15:25.579 David Stephens, Prof: Okay, what happens in passing actually, is that we've actually characterized the 642 01:15:25.680 --> 01:15:29.040 David Stephens, Prof: relationship between E and all other balancing scores. 643 01:15:29.560 --> 01:15:34.479 David Stephens, Prof: Right? So let's say, there was another balancing score, such that conditional on E. Tilde. 644 01:15:38.950 --> 01:15:40.720 David Stephens, Prof: Z. And x are independent. 645 01:15:41.910 --> 01:15:43.900 David Stephens, Prof: Well, what this shows is that 646 01:15:44.180 --> 01:15:47.289 David Stephens, Prof: E is a function of E. Tilde. That means that 647 01:15:49.300 --> 01:15:53.880 David Stephens, Prof: essentially e is a summary of the E. Tilde quantity. 648 01:15:55.840 --> 01:16:00.659 David Stephens, Prof: And what that shows us is that actually ex is the coarsest balancing score. 649 01:16:01.980 --> 01:16:09.540 David Stephens, Prof: meaning that if you have a balancing score which defines some strata, then 650 01:16:10.770 --> 01:16:19.700 David Stephens, Prof: you can do a restratification into broader strata based on E, which will mimic the strata of the original 651 01:16:21.840 --> 01:16:22.710 David Stephens, Prof: Etova. 652 01:16:24.730 --> 01:16:34.490 David Stephens, Prof: So to again, to make the analogy with sufficiency is some something like a minimal, sufficient school. 653 01:16:35.880 --> 01:16:41.380 David Stephens, Prof: Okay? He is the the the coarsest 654 01:16:41.970 --> 01:16:46.639 David Stephens, Prof: function of X that characterizes the distribution of Z given X, 655 01:16:50.040 --> 01:16:55.319 David Stephens, Prof: and that turns out to be important in several parts of the calculation that we're going to see. 656 01:16:55.870 --> 01:17:08.529 David Stephens, Prof: So all of these things are outlined in the famous paper by Rosenbaum biometric in 1983. So this is the construction of the propensity score. The limitation at the moment is that we're only doing this for binary 657 01:17:08.860 --> 01:17:13.489 David Stephens, Prof: treatments. But we'll see how to generalize that later on. 658 01:17:16.390 --> 01:17:22.579 David Stephens, Prof: Thinking about this in terms of the dag. What have we done? Well, we found a statistic to sit precisely here in the dag. 659 01:17:23.040 --> 01:17:26.410 David Stephens, Prof: It's on the pathway between X and Z. 660 01:17:27.380 --> 01:17:32.049 David Stephens, Prof: Such that if I condition on E that blocks the path to Z. 661 01:17:35.140 --> 01:17:39.809 David Stephens, Prof: Okay, that also blocks the confounding path between Z and y. 662 01:17:40.590 --> 01:17:52.059 David Stephens, Prof: but conditioning on E from a statistical perspective is much easier than conditioning on X, because X is potentially high, dimensional and has continuous components, whereas 663 01:17:52.360 --> 01:17:55.260 David Stephens, Prof: he is scalar. 664 01:17:56.280 --> 01:18:02.360 David Stephens, Prof: So operationalizing conditionally on E is going to be much more straightforward. 665 01:18:07.040 --> 01:18:09.380 David Stephens, Prof: Okay, so that's where it comes from 666 01:18:11.573 --> 01:18:15.900 David Stephens, Prof: the other thing to remember, though, is that E of x. 667 01:18:16.350 --> 01:18:23.909 David Stephens, Prof: which is this, probability must be correctly specified for this to work right? That's otherwise. The calculations don't work higher up. 668 01:18:25.090 --> 01:18:32.110 David Stephens, Prof: If X, again, is entirely discrete, then we may be able to estimate that non-parametrically so compute the fraction of 669 01:18:32.560 --> 01:18:39.239 David Stephens, Prof: Z equals one that appear in the strata defined by the axes large enough sample size. 670 01:18:39.360 --> 01:18:53.490 David Stephens, Prof: be able to estimate that not periodically, but typically what we do is what I said before, which is that this statistic becomes a actual, a function of some parameters. Alpha, that then need to be estimated from the data. 671 01:18:54.270 --> 01:18:59.832 David Stephens, Prof: Okay? And then this parametric model needs to be correctly specified. What I do is that 672 01:19:00.310 --> 01:19:05.279 David Stephens, Prof: estimate the alphas! Plug them in and get fitted values for E, 673 01:19:12.820 --> 01:19:13.309 David Stephens, Prof: okay? 674 01:19:14.640 --> 01:19:15.470 David Stephens, Prof: And 675 01:19:16.280 --> 01:19:22.276 David Stephens, Prof: so we'll talk about features of the propensity scores. We go through the rest of today and tomorrow. 676 01:19:23.530 --> 01:19:26.540 David Stephens, Prof: we can see from the dag that 677 01:19:27.922 --> 01:19:35.260 David Stephens, Prof: the known message confounders assumption, which was essentially that what the 678 01:19:35.920 --> 01:19:39.000 David Stephens, Prof: potential outcomes in Z were independent, given X 679 01:19:40.730 --> 01:19:45.480 David Stephens, Prof: right? So that know and measure confounders assumption that we mentioned before 680 01:19:45.850 --> 01:19:48.009 David Stephens, Prof: also holds for the propensity score 681 01:19:49.050 --> 01:19:56.670 David Stephens, Prof: right? So conditional on E of X. So here I've got the Y 0 and y 1 joint clear, independent of Z. Given X. 682 01:19:56.900 --> 01:20:02.520 David Stephens, Prof: What I can immediately immediately read off from the dag is that those y zs 683 01:20:02.770 --> 01:20:05.629 David Stephens, Prof: and z are independent, given e 684 01:20:06.400 --> 01:20:09.730 David Stephens, Prof: right, because in the original dag 685 01:20:10.190 --> 01:20:16.540 David Stephens, Prof: there was an arrow from X into the counterfactual outcomes, and an arrow from X into Z, 686 01:20:17.080 --> 01:20:18.900 David Stephens, Prof: and the fact that there was no 687 01:20:19.670 --> 01:20:27.969 David Stephens, Prof: at no path open path connecting Z and y, after conditioning on x means that they're independent conditionally on X 688 01:20:28.850 --> 01:20:29.540 David Stephens, Prof: right. 689 01:20:29.760 --> 01:20:42.399 David Stephens, Prof: There are only 2 paths from Z to y to the y. 0 y. 1, the one through x and the one through y. But the Y route has got a collider on it, so that path is not open. 690 01:20:43.090 --> 01:20:45.359 David Stephens, Prof: So the only connection between Zed 691 01:20:46.230 --> 01:20:50.800 David Stephens, Prof: and Y then is through X. So if we condition on X that pathway is blocked. 692 01:20:50.920 --> 01:20:52.670 David Stephens, Prof: So we have this assumption. 693 01:20:53.760 --> 01:20:57.849 David Stephens, Prof: But similarly, if I condition on E, then I have the same 694 01:20:59.510 --> 01:21:02.979 David Stephens, Prof: result. So the counterfactual outcomes in Z 695 01:21:03.460 --> 01:21:09.789 David Stephens, Prof: are also independent. Given E. So we have no unmeasured sorry we have, unconfirmed. Given the propensity score 696 01:21:10.460 --> 01:21:12.009 David Stephens, Prof: under no misch confounding. 697 01:21:14.190 --> 01:21:26.239 David Stephens, Prof: So how do I go about using the propensity score. Well, I can do the same things that I did before I could stratify, based on the propensity score, I could say, define some strata in terms of the propensity score. 698 01:21:26.440 --> 01:21:30.710 David Stephens, Prof: In this binary case the the ease values are all between 0 and one. 699 01:21:31.570 --> 01:21:34.879 David Stephens, Prof: So I define strata on this, maybe by Quintiles. 700 01:21:35.230 --> 01:21:38.879 David Stephens, Prof: and then I estimate the causal effect within quintiles of 701 01:21:39.030 --> 01:21:42.559 David Stephens, Prof: the propensity, score distribution and weight by the 702 01:21:43.830 --> 01:21:47.959 David Stephens, Prof: point 2 probability weight associated with that quintile. 703 01:21:48.710 --> 01:21:52.129 David Stephens, Prof: So I compute the propensity score values. 704 01:21:53.540 --> 01:21:59.220 David Stephens, Prof: I look at the treated individuals and the untreated individuals within each quintile stratum. 705 01:21:59.510 --> 01:22:07.620 David Stephens, Prof: Do a comparison, estimate the local causal effect, and then combine them using this formula, right? 706 01:22:09.050 --> 01:22:12.710 David Stephens, Prof: So what's assumed there is that within the stratum 707 01:22:12.960 --> 01:22:16.530 David Stephens, Prof: there's no effect of X on the average treatment effect. 708 01:22:18.380 --> 01:22:26.609 David Stephens, Prof: If I make the strata small enough. So I have a fine enough gradation on the propensity score range. Then maybe that holds. 709 01:22:27.310 --> 01:22:32.099 David Stephens, Prof: I need to make sure that I've got enough data within each strata, each each of the strata. 710 01:22:32.350 --> 01:22:39.450 David Stephens, Prof: to ensure that I can estimate this quantity by doing a mean comparison successfully. 711 01:22:40.560 --> 01:22:44.340 David Stephens, Prof: So I need essentially what's called an overlap condition. 712 01:22:44.550 --> 01:22:52.339 David Stephens, Prof: right? I need to make sure that I have enough treated and untreated individuals within the stratum to estimate the difference successfully. 713 01:22:54.120 --> 01:22:55.270 David Stephens, Prof: as it says here. 714 01:22:57.000 --> 01:22:59.520 David Stephens, Prof: So this is what we call an overlap condition, basically. 715 01:23:05.590 --> 01:23:09.710 David Stephens, Prof: so that's what we think of as propensity score stratification. 716 01:23:10.297 --> 01:23:17.630 David Stephens, Prof: I can do a related calculation, using the more granular, perhaps matching approach. 717 01:23:18.440 --> 01:23:20.960 David Stephens, Prof: So for matching 718 01:23:24.270 --> 01:23:34.779 David Stephens, Prof: what I needed to do previously, in one of the instances that I mentioned is to match treated and untreated individuals on the basis of their X profile. 719 01:23:35.470 --> 01:23:38.899 David Stephens, Prof: such that if I have for a fixed X value 720 01:23:39.050 --> 01:23:42.809 David Stephens, Prof: a treated individual and an untreated individual. 721 01:23:43.090 --> 01:24:02.839 David Stephens, Prof: due to no confounding assumption. Those 2 individuals are directly comparable, so I can look at the difference in their outcomes, and that will be an unbiased estimate of the treatment effect, and then I combine that across a whole collection of matched individuals to get an overall estimate in the ate. 722 01:24:05.210 --> 01:24:12.860 David Stephens, Prof: but matching on a large, a high dimensional X factor with continuous components is difficult. 723 01:24:13.410 --> 01:24:20.519 David Stephens, Prof: What I can do instead is match on the propensity score. So 2 individuals with the same propensity, score value 724 01:24:20.800 --> 01:24:30.979 David Stephens, Prof: are directly comparable. If one is treated and the other is untreated, then the difference in their outcomes is an unbiased estimator of the average treatment effect. 725 01:24:31.760 --> 01:24:37.319 David Stephens, Prof: So what I can do is to use the propensity score this one dimensional summary of the X's 726 01:24:38.750 --> 01:24:40.299 David Stephens, Prof: to match individuals. 727 01:24:42.940 --> 01:24:49.430 David Stephens, Prof: Okay, so that's a in a sense, a more granular version of stratification. 728 01:24:49.690 --> 01:24:52.380 David Stephens, Prof: Right? So I match at the individual level 729 01:24:53.300 --> 01:24:56.849 David Stephens, Prof: one treated person with one untreated person. 730 01:24:58.160 --> 01:25:08.242 David Stephens, Prof: And here's the logic. So this is like matching in other forms statistical analysis. We have matched pairs analysis that comes up in in different settings. 731 01:25:11.220 --> 01:25:21.910 David Stephens, Prof: what we have to do is to do the matching so matched individual i. 1 and a matched individual, i. 0 2 individuals. One treated the other in untreated find those 2 in the. 732 01:25:22.220 --> 01:25:30.470 David Stephens, Prof: in the study base, in the sample, look at the difference in their outcomes, and then average those over 733 01:25:30.980 --> 01:25:33.500 David Stephens, Prof: all the matched pairs that we can construct. 734 01:25:34.930 --> 01:25:40.260 David Stephens, Prof: and that gives an unbiased estimate of the average treatment effect as well. When we take that sample average. 735 01:25:40.420 --> 01:25:53.600 David Stephens, Prof: because by matching we've removed the effect of X. So this is a, I think, a well-known general principle in statistics outside of causal inference, but it gives us insight into the causal 736 01:25:54.730 --> 01:25:55.930 David Stephens, Prof: effect 737 01:25:56.140 --> 01:26:08.130 David Stephens, Prof: due to the fact that we've been able to remove the influence of X by the matching. And here we're going to match on the propensity score which in principle is more straightforward than matching on the individual. X's. 738 01:26:11.140 --> 01:26:15.339 David Stephens, Prof: So again, for high dimensional and continuous components matching 739 01:26:16.240 --> 01:26:36.849 David Stephens, Prof: on the original variables is hard if we use the propensity score that becomes a 1 dimensional problem. So matching on that is more straightforward. But it's still a continuous quantity in general, so we might might have to think about ways of achieving that matching. So exact matching is not going to be possible. So we need to have approximate matching. 740 01:26:38.160 --> 01:26:39.230 David Stephens, Prof: So 741 01:26:39.420 --> 01:26:46.450 David Stephens, Prof: we can do that in a number of different ways. We can say that 2 individuals are matched if their propensity scores are close enough. 742 01:26:47.120 --> 01:26:55.730 David Stephens, Prof: or we can say that 2 individuals are matched if they if we find one treated individual 743 01:26:56.020 --> 01:27:03.799 David Stephens, Prof: and then find the nearest impropensity, score terms untreated, individual, and regard that person as matched. 744 01:27:05.990 --> 01:27:08.329 David Stephens, Prof: We could do that for more than one 745 01:27:08.800 --> 01:27:16.810 David Stephens, Prof: untreated individual. So we could say that we're going to pick one treated individual and big, M untreated individuals to match on. 746 01:27:17.110 --> 01:27:19.299 David Stephens, Prof: So the so-called one to M. Matching. 747 01:27:20.280 --> 01:27:21.030 David Stephens, Prof: Okay? 748 01:27:22.020 --> 01:27:24.360 David Stephens, Prof: And we could 749 01:27:24.730 --> 01:27:36.140 David Stephens, Prof: choose to implement the matching in a in a replacement fashion. So go through the treated individuals, and only pick untreated individuals, and then only use the sample where 750 01:27:37.760 --> 01:27:51.260 David Stephens, Prof: the individuals in either subsample are only used once, or which is more typically done. Think about matching with replacement. So one individual is allowed to match with multiple other individuals. 751 01:27:52.170 --> 01:28:10.029 David Stephens, Prof: Okay, now, to operationalize, this is fairly straightforward in standard statistical software. So actually achieving the matching of individuals is straightforward, then the final step of estimating the average treatment effect is usually pretty straightforward. 752 01:28:11.434 --> 01:28:20.220 David Stephens, Prof: But the more problematic aspect for matching is to understand the statistical operating characteristics. 753 01:28:20.480 --> 01:28:22.809 David Stephens, Prof: So when we end up with 754 01:28:23.100 --> 01:28:28.680 David Stephens, Prof: an estimate of the average treatment effect, what is the prop? What are the properties of the corresponding estimator? 755 01:28:30.930 --> 01:28:36.310 David Stephens, Prof: And because it's also a fairly non-parametric method overall? 756 01:28:37.060 --> 01:28:39.530 David Stephens, Prof: It's a method that can be quite variable 757 01:28:41.290 --> 01:28:44.929 David Stephens, Prof: in the numerical examples that I'll show tomorrow. I'll show 758 01:28:46.490 --> 01:28:52.959 David Stephens, Prof: how it can be implemented using some packages in our. And the functionality in those packages is really great 759 01:28:54.157 --> 01:29:00.209 David Stephens, Prof: reports, different. Important quantities for different S demands. 760 01:29:00.350 --> 01:29:14.779 David Stephens, Prof: Okay? And matching can be used directly, very easily to look at the average treatment effect on the treated, but also which is where it's most typically used, but also just for the ordinary average treatment effect as well. 761 01:29:14.940 --> 01:29:17.239 David Stephens, Prof: And the package that I'm going to show you 762 01:29:17.640 --> 01:29:21.789 David Stephens, Prof: allows you to specify which of those options you're going for 763 01:29:26.480 --> 01:29:30.739 David Stephens, Prof: just to say briefly, to end today, we can go beyond the binary case. 764 01:29:31.977 --> 01:29:40.360 David Stephens, Prof: In that case we need to look at functions of both excellent Z. In general. 765 01:29:41.420 --> 01:29:47.380 David Stephens, Prof: the proof that the propensity score is a balancing score operates in exactly the same way. 766 01:29:48.130 --> 01:29:58.380 David Stephens, Prof: and I just mention it. Here we look for a statistic which summarizes the Xz distribution, such that conditional on that statistic here. I've called it B for balancing 767 01:29:58.490 --> 01:30:01.830 David Stephens, Prof: conditional on that value. X and Z are independent. 768 01:30:03.220 --> 01:30:05.770 David Stephens, Prof: Okay? And it even turns out that 769 01:30:06.260 --> 01:30:18.309 David Stephens, Prof: you can use the same kind of construction in this more general case. So here I'm thinking about continuous treatments or multi-value treatments, it all works in the same way, and this leads us to what's called the generalized propensity score. 770 01:30:18.930 --> 01:30:25.799 David Stephens, Prof: Okay? So I've got a statistic which summarizes this conditional distribution essentially characterizes this conditional distribution. 771 01:30:26.010 --> 01:30:26.900 David Stephens, Prof: But 772 01:30:27.710 --> 01:30:41.979 David Stephens, Prof: sometimes working with that more general version is more problematic. So another route that people have taken which is actually a more straightforward route for the implementation in many statistical methods is to look for a different kind of characterization 773 01:30:42.440 --> 01:30:52.690 David Stephens, Prof: that is, provided we can choose a statistic which summarizes the distribution of Z given X to some 774 01:30:53.140 --> 01:30:57.479 David Stephens, Prof: statistic. B, it doesn't have to be that this also depends on Z, 775 01:30:58.560 --> 01:31:05.420 David Stephens, Prof: right? So it could be that B is just a function of X like the propensity score is a function of X for the binary case. 776 01:31:06.110 --> 01:31:18.990 David Stephens, Prof: and the kind of thing that I'm thinking about here is that if you have a continuous exposure. Z, which you believe follows some normal model where the mean depends on X alpha. Let's say the mean is X alpha. 777 01:31:19.260 --> 01:31:23.350 David Stephens, Prof: then x alpha is precisely the balancing score or 778 01:31:24.022 --> 01:31:34.160 David Stephens, Prof: X's that lead to the same mean characterize the distribution of said accurately right? So it might be 779 01:31:34.470 --> 01:31:46.970 David Stephens, Prof: that instead of looking for a function of both X and Z, which in full generality, we need actually, we might be able to find in some cases balancing scores that are just functions of X, 780 01:31:48.260 --> 01:31:54.690 David Stephens, Prof: and that turns out to be actually an easier statistical strategy in most cases. 781 01:31:54.860 --> 01:32:03.869 David Stephens, Prof: Okay, so what we would be looking for are functions of X. That characterize the distribution of Z given X 782 01:32:04.130 --> 01:32:06.300 David Stephens, Prof: right, maybe up to some parameters. 783 01:32:06.920 --> 01:32:12.650 David Stephens, Prof: And what that means is that that original construction of Rosenbaum and Ruben, which, applied in the binary case 784 01:32:13.110 --> 01:32:18.580 David Stephens, Prof: actually can be extended very easily to arbitrary treatment. 785 01:32:18.770 --> 01:32:21.370 David Stephens, Prof: and this is not much studied in the literature. 786 01:32:21.770 --> 01:32:29.320 David Stephens, Prof: but what this logic has showed us is that there really is. No, there's no problem in moving from the binary case to the general case. 787 01:32:32.680 --> 01:32:38.289 David Stephens, Prof: Yeah. So here's the finish of that example, we're going to characterize the mean by X Alpha. 788 01:32:40.840 --> 01:32:45.240 David Stephens, Prof: And this is induces balance in the same way. 789 01:32:47.710 --> 01:32:52.330 David Stephens, Prof: Okay, so that completes the 1st day. I've tried to show 790 01:32:53.049 --> 01:32:58.650 David Stephens, Prof: the general construction and then introduce some statistical methods based on 791 01:32:58.870 --> 01:33:08.070 David Stephens, Prof: matching and balance, and then shown the role that the constructed propensity score, which is a constructed balancing score, can play in helping us to achieve 792 01:33:08.450 --> 01:33:10.260 David Stephens, Prof: the balance that we're after. 793 01:33:10.910 --> 01:33:35.349 David Stephens, Prof: We've seen stratification and matching as 2 possible methods by which the propensity score can be used, and in tomorrow's module we'll see half module. We'll see that actually, some common statistical tools like regression can also be used based on the propensity score. So that's where we'll pick up tomorrow. 794 01:33:35.760 --> 01:33:41.289 David Stephens, Prof: Okay, so thanks, I'll stop there. I'll hang around for a bit. I'm just gonna stop the recording 795 01:33:42.290 --> 01:33:44.290 David Stephens, Prof: before people ask questions. 796 01:33:45.910 --> 01:33:47.060 David Stephens, Prof: If you have any.