WEBVTT 1 00:00:32.460 --> 00:00:34.569 David Stephens, Prof: So it's 1130 now. 2 00:00:36.710 --> 00:00:43.850 David Stephens, Prof: And a bit of a low turnout so far on the on the participant list. 3 00:00:45.100 --> 00:00:46.429 David Stephens, Prof: But thank you for. 4 00:00:46.610 --> 00:00:48.847 David Stephens, Prof: Thank you for turning up today. 5 00:00:49.700 --> 00:00:55.659 David Stephens, Prof: I am gonna get started, I think, because 6 00:00:55.810 --> 00:01:00.950 David Stephens, Prof: I'm not sure how many people will just tune in for the recording. 7 00:01:01.650 --> 00:01:05.099 David Stephens, Prof: And my 1st slide or so is just gonna be a 8 00:01:05.450 --> 00:01:10.430 David Stephens, Prof: wrap up of yesterday's summary of yesterday's module. 9 00:01:11.010 --> 00:01:17.240 David Stephens, Prof: So we saw yesterday that causal inferences about quantifying 10 00:01:17.340 --> 00:01:21.660 David Stephens, Prof: the effect of an intervention, a treatment, let's say, on some outcome. 11 00:01:24.100 --> 00:01:33.050 David Stephens, Prof: If we have experimental data rising, arising from, say, a randomized trial, then the 12 00:01:33.360 --> 00:01:53.119 David Stephens, Prof: causal comparisons that we want to carry out straightforward, because we can compare the 2 treatment. Groups say directly. Individuals in those groups are exchangeable, so the groups are directly comparable. The only systematic difference between them is their treatment status. So the outcomes for those groups 13 00:01:53.430 --> 00:02:02.950 David Stephens, Prof: can genuinely, directly compared. We can do a 2 group comparison of means, say, but for observational data 14 00:02:03.130 --> 00:02:04.809 David Stephens, Prof: we don't have that luxury. 15 00:02:05.610 --> 00:02:09.299 David Stephens, Prof: There are complications due to confounding by other variables. 16 00:02:09.680 --> 00:02:18.180 David Stephens, Prof: and the direct comparison of the 2 groups is not possible principally. That's because 17 00:02:18.720 --> 00:02:21.370 David Stephens, Prof: the 2 groups are not exchangeable. They're not 18 00:02:21.820 --> 00:02:28.430 David Stephens, Prof: fundamentally comparable. They have different, confounder profiles in general. 19 00:02:31.650 --> 00:02:39.130 David Stephens, Prof: So by an analysis, a careful analysis of the structure of the problem and guidance through 20 00:02:40.380 --> 00:02:43.969 David Stephens, Prof: direct directed Acyclic graph constructions. 21 00:02:45.840 --> 00:02:47.649 David Stephens, Prof: We saw that we could 22 00:02:49.910 --> 00:03:04.429 David Stephens, Prof: remove, confounding or account for confounding by particular sorts of conditioning, conditioning on the confounding variables in particular. And what we also started to look at was that that conditioning could be achieved in a number of ways most 23 00:03:05.540 --> 00:03:08.759 David Stephens, Prof: straightforwardly, perhaps, some form of matching 24 00:03:08.990 --> 00:03:16.770 David Stephens, Prof: so individuals with identical, identical, and founder values would have comparable, 25 00:03:19.760 --> 00:03:28.779 David Stephens, Prof: would have would have comparable natures, let's say, separate from the treatment. So if you had people with identical identical confounder profiles 26 00:03:29.630 --> 00:03:35.189 David Stephens, Prof: and different treatments, then you could look at the difference in their outcomes to get an unbiased estimate of the 27 00:03:35.530 --> 00:03:36.930 David Stephens, Prof: causal contrast. 28 00:03:37.380 --> 00:03:39.940 David Stephens, Prof: And then you aggregate that over 29 00:03:40.170 --> 00:03:45.790 David Stephens, Prof: matched pairs of individuals in the in the study you can get a an unbiased estimate of the 30 00:03:47.770 --> 00:03:49.319 David Stephens, Prof: the average treatment effect. 31 00:03:50.080 --> 00:03:51.270 David Stephens, Prof: But matching 32 00:03:51.460 --> 00:03:58.710 David Stephens, Prof: in general is complicated by the fact that you might have continuous covariates. You can't get exact match on numerical values. 33 00:03:58.890 --> 00:04:02.940 David Stephens, Prof: It might be that you've got a high dimensional confound, a vector 34 00:04:03.420 --> 00:04:09.568 David Stephens, Prof: in which case doing matching may not even be possible, but it certainly it may lead to 35 00:04:10.930 --> 00:04:18.380 David Stephens, Prof: the need to reduce the total number of individuals in the sample, so that you can effectively match everyone that's left. 36 00:04:21.019 --> 00:04:27.380 David Stephens, Prof: So what we also saw right at the end was then that matching could be achieved, not by 37 00:04:27.600 --> 00:04:34.800 David Stephens, Prof: matching on the individual and founder values, but instead, on an important summary 38 00:04:35.070 --> 00:04:46.450 David Stephens, Prof: of the X's. Of the confounders, which we defined to be the propensity score, which in the binary treatment case, had a very simple interpretation as the probability of receiving treatment 39 00:04:47.110 --> 00:04:49.080 David Stephens, Prof: conditional on the confounders. 40 00:04:49.780 --> 00:04:53.669 David Stephens, Prof: So a scalar summary of the Xz distribution. 41 00:04:54.080 --> 00:04:59.940 David Stephens, Prof: okay? And we saw that matching on that scale of quantity was going to be more straightforward than 42 00:05:01.680 --> 00:05:08.640 David Stephens, Prof: matching on the entire confounder vector we also saw sort of slight 43 00:05:09.220 --> 00:05:15.440 David Stephens, Prof: variations on the theme of matching, we saw stratification, which is a more broad form of matching approach. 44 00:05:16.770 --> 00:05:24.880 David Stephens, Prof: so the propensity score is the key quantity that allows us to break, confounding by conditioning in a straightforward way. 45 00:05:25.960 --> 00:05:33.170 David Stephens, Prof: The propensity score is a balancing score in that within strata of the propensity score, or indeed at 46 00:05:33.880 --> 00:05:45.570 David Stephens, Prof: common propensity, score values individuals have comparable X profiles. 47 00:05:46.230 --> 00:05:50.140 David Stephens, Prof: So people matched on the propensity score become directly comparable. 48 00:05:50.530 --> 00:05:55.260 David Stephens, Prof: People in propensity, score strata are regarded as directly comparable. 49 00:05:56.230 --> 00:06:02.479 David Stephens, Prof: Okay, so matching and stratification are the 2 1st methods that we looked at for the use of the propensity score. 50 00:06:02.780 --> 00:06:06.340 David Stephens, Prof: What we're going to get on to today is more, a more. 51 00:06:09.990 --> 00:06:12.733 David Stephens, Prof: perhaps straightforward and more 52 00:06:13.910 --> 00:06:20.360 David Stephens, Prof: easy to understand, perhaps approach to conditioning, using the propensity score which is using regression. 53 00:06:21.450 --> 00:06:26.380 David Stephens, Prof: So what we're going to see is that we can build a regression model 54 00:06:27.180 --> 00:06:35.440 David Stephens, Prof: involving propensity score terms that will allow us to make causal conclusions from the observational data 55 00:06:36.010 --> 00:06:38.890 David Stephens, Prof: conditioning on the propensity score through regression 56 00:06:39.230 --> 00:06:47.510 David Stephens, Prof: will allow us to, let's say, estimate parameters in those regression models and interpret those parameters as average treatment effects. That's what we'll see. 57 00:06:48.750 --> 00:06:50.920 David Stephens, Prof: Okay, and 58 00:06:52.000 --> 00:07:00.689 David Stephens, Prof: perhaps we prefer regression as a methodology. Because we understand, I mean, it's 1 of the 1st statistical tools we learn about. 59 00:07:02.210 --> 00:07:03.150 David Stephens, Prof: We fit 60 00:07:03.680 --> 00:07:11.790 David Stephens, Prof: simple linear regression models or multiple multiple linear regression models to learn about the effects of variables on outcome variables. 61 00:07:12.810 --> 00:07:16.229 David Stephens, Prof: And so these tools are well understood. They have nice 62 00:07:17.841 --> 00:07:26.269 David Stephens, Prof: computable statistical properties, we can learn about variance, bias and variance and consistency, and so on very easily in these models. 63 00:07:28.280 --> 00:07:33.470 David Stephens, Prof: So we saw earlier on that regression. Regression itself was a 64 00:07:34.290 --> 00:07:43.119 David Stephens, Prof: a solid causal inference tool under correct specification. And what we're going to see now is that that's correct specification of the 65 00:07:43.320 --> 00:07:49.549 David Stephens, Prof: model for the outcome given the confounders and the treatment. 66 00:07:49.740 --> 00:07:55.730 David Stephens, Prof: What we'll see in this section is that that requirement for correct specification can be relaxed a little 67 00:07:56.470 --> 00:08:00.690 David Stephens, Prof: right? So the propensity score model is going to allow us to 68 00:08:00.900 --> 00:08:05.229 David Stephens, Prof: relax certain parts of the correct specification requirement. 69 00:08:09.400 --> 00:08:13.760 David Stephens, Prof: I'll come on to discuss there the subtleties of that 70 00:08:14.240 --> 00:08:16.980 David Stephens, Prof: in the rest of the 1st part of the session. 71 00:08:18.070 --> 00:08:19.340 David Stephens, Prof: Oop. Sorry. 72 00:08:21.450 --> 00:08:27.596 David Stephens, Prof: Yeah, this one. So the idea is that we're going to 73 00:08:28.650 --> 00:08:36.749 David Stephens, Prof: build a regression model that explicitly, albeit potentially, incorrectly. 74 00:08:37.950 --> 00:08:43.890 David Stephens, Prof: proposes a dependence of the outcome on the propensity score. 75 00:08:44.670 --> 00:08:54.220 David Stephens, Prof: So although we recognize that the dag here is not the data generating mechanism potentially, because 76 00:08:54.540 --> 00:08:58.660 David Stephens, Prof: we don't really believe that E of X is a cause of y. 77 00:08:58.770 --> 00:09:01.520 David Stephens, Prof: E of X being the binary propensity score. 78 00:09:03.060 --> 00:09:04.699 David Stephens, Prof: We're going to build a model. 79 00:09:05.330 --> 00:09:09.190 David Stephens, Prof: a regression model that reflects this as a sort of structural model. 80 00:09:09.670 --> 00:09:14.339 David Stephens, Prof: and it'll turn out that that'll be sufficient to allow us to learn about the 81 00:09:14.950 --> 00:09:19.389 David Stephens, Prof: average treatment effect the direct effect of Z on y. 82 00:09:22.330 --> 00:09:29.670 David Stephens, Prof: So I put the arrow in red here to indicate that it's a a proposed analysis model. 83 00:09:30.560 --> 00:09:34.079 David Stephens, Prof: even though we recognize it's not the data generating model. 84 00:09:40.080 --> 00:09:47.819 David Stephens, Prof: So we build a regression model for Y, given X, the propensity score value and Z 85 00:09:50.490 --> 00:09:53.069 David Stephens, Prof: and the key part of the construction 86 00:09:55.590 --> 00:09:58.360 David Stephens, Prof: that the propensity score brings brings 87 00:09:58.650 --> 00:10:01.610 David Stephens, Prof: is that conditional on the propensity score 88 00:10:02.080 --> 00:10:15.770 David Stephens, Prof: X and Z. Are independent. That was the whole point. That was the balancing argument. Right? That was the argument that we used when we said that within strata of the propensity score X and Z are independent. 89 00:10:18.940 --> 00:10:24.780 David Stephens, Prof: and if we have that Z and x are independent, given e. 90 00:10:25.820 --> 00:10:31.930 David Stephens, Prof: Then we know from standard regression theory that, due to that independence. 91 00:10:32.210 --> 00:10:34.640 David Stephens, Prof: we may be able to learn about the 92 00:10:35.180 --> 00:10:42.650 David Stephens, Prof: true effect of Z. The causal effect of Z, even if the model for E of y, given 93 00:10:42.880 --> 00:10:50.990 David Stephens, Prof: the other variables is not exactly correctly specified, provided we have 94 00:10:51.390 --> 00:10:55.990 David Stephens, Prof: the dependence on Z correctly specified right? 95 00:10:56.250 --> 00:10:57.159 David Stephens, Prof: There are. 96 00:10:58.170 --> 00:11:11.050 David Stephens, Prof: So we know from general regression theory that if you fit a misspecified regression model. Then, in general, you don't get consistent estimation of any of the coefficients. 97 00:11:11.830 --> 00:11:15.600 David Stephens, Prof: If you omit a covariate, then 98 00:11:19.320 --> 00:11:24.449 David Stephens, Prof: a critical covariate, you know that you won't, you'll get biased estimation of the other parameters. 99 00:11:24.630 --> 00:11:30.580 David Stephens, Prof: There are 2 situations in which that incorrect specification 100 00:11:30.830 --> 00:11:36.890 David Stephens, Prof: does, in fact, give valid inference. The 1st is when you have a a model that contains 101 00:11:38.080 --> 00:11:45.089 David Stephens, Prof: spurious variables, that is the true model is contained in the model that you fit. 102 00:11:45.850 --> 00:11:52.120 David Stephens, Prof: Because then what happens is that the regression coefficients for the spurious variables get estimated to be roughly 0. 103 00:11:52.910 --> 00:12:00.329 David Stephens, Prof: Right? So if the true model, the data generating model is nested inside the model that you fit. 104 00:12:00.850 --> 00:12:03.829 David Stephens, Prof: then you will get correct inference for the 105 00:12:05.270 --> 00:12:08.139 David Stephens, Prof: coefficients, for the variables in the true model. 106 00:12:10.950 --> 00:12:18.549 David Stephens, Prof: The fitting of the spurious variables is not ideal, you do lose some efficiency due to that, but that doesn't affect bias or consistency. 107 00:12:20.480 --> 00:12:28.339 David Stephens, Prof: The other situation in which an incorrect specification can give correct inference for some of the parameters is when 108 00:12:30.460 --> 00:12:41.830 David Stephens, Prof: this the dependence between the what the components that are miss specified, and 109 00:12:44.980 --> 00:12:48.080 David Stephens, Prof: the quantity of interest in this case, Z. 110 00:12:51.030 --> 00:12:53.950 David Stephens, Prof: Those collections of variables are independent. 111 00:12:56.960 --> 00:13:01.789 David Stephens, Prof: so you will still get unbiased and consistent inference if you fit. 112 00:13:02.540 --> 00:13:05.790 David Stephens, Prof: A model that has the right dependence on Z. Say. 113 00:13:06.200 --> 00:13:14.190 David Stephens, Prof: but has a missed specification with respect to the dependence on X, provided actions that are independent. 114 00:13:15.150 --> 00:13:18.409 David Stephens, Prof: So in general, we don't have that. This is why, in general. 115 00:13:18.540 --> 00:13:32.550 David Stephens, Prof: Miss. Specified models give him incorrect inference. But under this independence assumption you will get correct inference. That's that's standard regression theory. Here. We're going to induce that independence by also conditioning on the propensity score. 116 00:13:35.280 --> 00:13:38.259 David Stephens, Prof: So the model we might fit is, for example, this one. 117 00:13:39.270 --> 00:13:52.770 David Stephens, Prof: if we believed that the effect of Z was represented adequately by the term Psi 0 zad. Say. 118 00:13:57.110 --> 00:14:00.129 David Stephens, Prof: then, if we fitted this model. 119 00:14:00.560 --> 00:14:03.060 David Stephens, Prof: then it turns out that this would be sufficient 120 00:14:03.710 --> 00:14:09.690 David Stephens, Prof: to learn about the average treatment effect. And in fact, in this case the average treatment effect would be size 0, 121 00:14:11.410 --> 00:14:12.110 David Stephens, Prof: right? 122 00:14:12.360 --> 00:14:14.799 David Stephens, Prof: If we treat this as a structural model 123 00:14:15.300 --> 00:14:20.720 David Stephens, Prof: which it isn't. It's not the data generating structural model. If we treat this as a structural model, though. 124 00:14:20.830 --> 00:14:23.710 David Stephens, Prof: then it's clear that size 0 is the 125 00:14:24.250 --> 00:14:30.559 David Stephens, Prof: average treatment effect right? Because if I look at the difference between the expected value of this function. 126 00:14:31.020 --> 00:14:37.429 David Stephens, Prof: when Z equals when z is intervened on to be set equal to one, and then subtract from that 127 00:14:37.850 --> 00:14:43.739 David Stephens, Prof: the value I get when I set Z equal to 0. Then I get as a result of that differencing 128 00:14:43.860 --> 00:14:44.940 David Stephens, Prof: size error. 129 00:14:45.640 --> 00:14:46.300 David Stephens, Prof: Right 130 00:14:49.850 --> 00:14:56.580 David Stephens, Prof: now, as I mentioned a couple of times, this model is not really 131 00:14:56.860 --> 00:15:04.170 David Stephens, Prof: palatable as a data generating model, right? We don't really believe that this is the 132 00:15:04.450 --> 00:15:07.070 David Stephens, Prof: structural model. We don't believe that. 133 00:15:07.230 --> 00:15:11.020 David Stephens, Prof: Why is caused in this way? Right? 134 00:15:11.710 --> 00:15:20.989 David Stephens, Prof: Because the dependence on the dependence on ex here is somewhat artificial 135 00:15:22.740 --> 00:15:31.839 David Stephens, Prof: right. We might believe some. I don't know. Some other function of access is here. But we it's really been a bit of a stretch to rely on ex being 136 00:15:32.040 --> 00:15:34.880 David Stephens, Prof: the true data generating component in this model. 137 00:15:35.350 --> 00:15:37.379 David Stephens, Prof: But it turns out that that doesn't matter. 138 00:15:38.100 --> 00:15:45.499 David Stephens, Prof: And it turns out that even if this model is not the true data generating model because of the 139 00:15:47.310 --> 00:15:55.290 David Stephens, Prof: conditioning on ex, which is capsulated in the 3rd term. We do, in fact, get correct inference for psi 0. 140 00:15:57.940 --> 00:16:01.109 David Stephens, Prof: And I'll talk a bit more about why, that's the case as we go through. 141 00:16:04.680 --> 00:16:10.710 David Stephens, Prof: More generally. If we had a balancing score B, 142 00:16:11.790 --> 00:16:15.380 David Stephens, Prof: then we might think about fitting a model. 143 00:16:15.960 --> 00:16:18.790 David Stephens, Prof: a new model which is based on those 144 00:16:19.420 --> 00:16:22.579 David Stephens, Prof: right hand side variables Xz and B. 145 00:16:23.470 --> 00:16:26.580 David Stephens, Prof: And it is certainly the case 146 00:16:26.820 --> 00:16:30.339 David Stephens, Prof: that if this was the true data generating conditional mean. 147 00:16:30.950 --> 00:16:35.489 David Stephens, Prof: then we would get correct inference by fitting this regression model. 148 00:16:38.580 --> 00:16:49.210 David Stephens, Prof: So if this were, if this is the case in the binary treatment. But if we believe this is the true data generating model, then we could just use this as a regression 149 00:16:49.730 --> 00:17:00.230 David Stephens, Prof: regress Y on mu, essentially, and then learn about the the average treatment effect by fitting the model. 150 00:17:01.690 --> 00:17:11.430 David Stephens, Prof: working out the fitted values from the model, averaging them. 151 00:17:12.550 --> 00:17:19.360 David Stephens, Prof: So we do this in a 2 stage approach. Essentially, we say, we fit the balancing model, 1st regressing Z on X. 152 00:17:19.970 --> 00:17:25.330 David Stephens, Prof: We then fit this model, incorporating the fitted values B hat. 153 00:17:26.790 --> 00:17:34.710 David Stephens, Prof: and then that might be some parametric model, and then for each that will give us some estimated values for the, for the 154 00:17:37.410 --> 00:17:46.509 David Stephens, Prof: conditional mean, assuming the correct that it's the correct structure. If we plug in the target Z values. 155 00:17:46.770 --> 00:17:56.240 David Stephens, Prof: right? So this approach is really just the standard regression approach, except that we are presuming that 156 00:17:56.830 --> 00:18:03.730 David Stephens, Prof: the regression function depends on B, and as it says here, that's a very particular kind of assumption. 157 00:18:03.960 --> 00:18:07.470 David Stephens, Prof: I mean, very perhaps artificial kind of assumption. 158 00:18:07.970 --> 00:18:16.859 David Stephens, Prof: But if it were correct, then this would give us correct inference about the average treatment well here for the average potential outcome. But it would give us for the average treatment effect as well. 159 00:18:19.670 --> 00:18:22.049 David Stephens, Prof: So if we had a propensity score model 160 00:18:22.200 --> 00:18:31.260 David Stephens, Prof: so binary exposure, then we would fit a parametric version of the propensity score, let's say, using logistic regression. We'd learn about the 161 00:18:31.440 --> 00:18:34.270 David Stephens, Prof: parameters in that regression model. 162 00:18:34.380 --> 00:18:42.600 David Stephens, Prof: get fitted values for the propensity score and then use those fitted values in a second stage analysis. 163 00:18:44.020 --> 00:18:51.510 David Stephens, Prof: regressing on the propensity score here, but then also the treatment here, right? 164 00:18:52.000 --> 00:18:56.760 David Stephens, Prof: And certainly, if this were the data generating model. 165 00:18:58.500 --> 00:19:01.649 David Stephens, Prof: then we would get correct inference per se. 166 00:19:02.210 --> 00:19:16.309 David Stephens, Prof: And we'll see in a second that actually, even if this is not the correct data generating model, provided this treatment effect component is correctly specified. We still do get correct inference for the average treatment effect. 167 00:19:22.980 --> 00:19:31.579 David Stephens, Prof: Again, using the same sort of means, we average the the fitted values from that model in order to get an estimate for the average potential outcome at that value. 168 00:19:31.940 --> 00:19:39.009 David Stephens, Prof: And it's important to note that we don't just take the the fitted values from this model that you get from, say predict in 169 00:19:39.430 --> 00:19:46.799 David Stephens, Prof: or no. Sorry from fitted in R. You have to predict at the target. Z values 170 00:19:48.670 --> 00:19:54.770 David Stephens, Prof: right? So you'll get the parameter estimates in this parametric model. You can plug in the E hats 171 00:19:56.190 --> 00:20:00.429 David Stephens, Prof: and then, using this method, you plug in beta hat, psi hat. 172 00:20:00.550 --> 00:20:06.740 David Stephens, Prof: phi. 0 hat and e hat, and then manipulate Z from 0 to one. 173 00:20:07.410 --> 00:20:12.509 David Stephens, Prof: And that would give you an estimate of the average treatment effect when you average over the population. 174 00:20:14.000 --> 00:20:26.299 David Stephens, Prof: Okay, so it's a simple approach. We're just essentially using the propensity scores and an additional regressor. 175 00:20:27.080 --> 00:20:34.519 David Stephens, Prof: Okay, it requires us to make 2 choices. It requires us to specify the propensity score or balancing model. 176 00:20:34.910 --> 00:20:36.629 David Stephens, Prof: depending on whether we're working with 177 00:20:37.240 --> 00:20:43.230 David Stephens, Prof: binary or general treatments, and it requires us to specify the outcome, mean model. 178 00:20:47.790 --> 00:20:55.560 David Stephens, Prof: Now for consistent difference generally in regression, we need correct specification of the outcome, mean model. 179 00:20:55.700 --> 00:20:59.859 David Stephens, Prof: which requires a sorcer to have correct specification of the propensity model. 180 00:21:01.000 --> 00:21:01.670 David Stephens, Prof: Right? 181 00:21:01.870 --> 00:21:07.260 David Stephens, Prof: We know we get guaranteed consistent estimation in that case. 182 00:21:07.750 --> 00:21:16.699 David Stephens, Prof: But that's essentially back to the regression framework. What we're going to see now is that or we're going to talk about now is the fact that actually, we can relax 183 00:21:16.960 --> 00:21:24.080 David Stephens, Prof: some requirement for correct specification here and still get consistent inference for the average treatment effect. 184 00:21:25.190 --> 00:21:28.580 David Stephens, Prof: and I'll pause here to reflect on the fact that 185 00:21:30.290 --> 00:21:36.630 David Stephens, Prof: There's a good question that somebody asked me at the end of yesterday's session, which is that? Well, we started off needing a correct specification 186 00:21:37.920 --> 00:21:41.299 David Stephens, Prof: in regression, but we rejected that. 187 00:21:41.430 --> 00:21:46.050 David Stephens, Prof: And now we're saying, Well, we're going to need correct specification of the propensity score. 188 00:21:46.500 --> 00:21:54.050 David Stephens, Prof: So why would we bother with propensity score modeling? In the 1st place, if that correct specification is that is needed there. 189 00:21:54.420 --> 00:22:08.250 David Stephens, Prof: And the answer really is that in the causal cause an inference setting the modeling of the Xz relationship 190 00:22:08.410 --> 00:22:19.070 David Stephens, Prof: is regarded as more palatable than the modeling of the Y versus Xz relationship. So it's it's regarded as being more straightforward 191 00:22:19.860 --> 00:22:25.100 David Stephens, Prof: to capture the treatment assignment model says that given axe 192 00:22:25.700 --> 00:22:31.699 David Stephens, Prof: that's more straightforward than constructing a correct model for Y, given X and Z. 193 00:22:34.109 --> 00:22:39.620 David Stephens, Prof: But that doesn't mean that, you know. Everybody agrees with that contention. 194 00:22:41.790 --> 00:22:43.840 David Stephens, Prof: There are successful. 195 00:22:44.660 --> 00:22:52.830 David Stephens, Prof: flexible outcome modeling techniques that have been used to learn about average treatment effect in this kind of setting 196 00:22:53.170 --> 00:22:54.810 David Stephens, Prof: and the 197 00:22:55.040 --> 00:23:04.349 David Stephens, Prof: the use of propensity school there is completely removed. We just do regression. We just make sure we get the regression model correctly specified, using flexible approaches. 198 00:23:04.540 --> 00:23:09.600 David Stephens, Prof: So there's certainly that's certainly a legitimate approach. Many people have implemented that successfully. 199 00:23:11.000 --> 00:23:25.359 David Stephens, Prof: However, my contention here is, and probably being from the causal side a bit more, I think it is definitely the case that, constructing a model for Z given X and giving us the propensity score. The balancing score, say, is 200 00:23:25.590 --> 00:23:28.919 David Stephens, Prof: in many cases more straightforward. 201 00:23:30.330 --> 00:23:32.140 David Stephens, Prof: So if we can use that 202 00:23:32.660 --> 00:23:42.040 David Stephens, Prof: and then deploy, let's say regression techniques, then we can induce, in fact, some robustness into the regression analysis 203 00:23:42.630 --> 00:23:46.639 David Stephens, Prof: still learn about the target parameter. 204 00:23:46.750 --> 00:23:49.410 David Stephens, Prof: but without relying on correct specification. 205 00:23:52.170 --> 00:24:03.830 David Stephens, Prof: And the kind of setting I'm thinking of for that is, if we take the binary example, is, if we have the true data generating model being this. So, all binary treatment outcome models must look like this. There's a function that depends on 206 00:24:03.930 --> 00:24:08.889 David Stephens, Prof: just X. And there's z times a function that depends on x in general. 207 00:24:09.390 --> 00:24:16.399 David Stephens, Prof: Right? So if Z is 0, I just get this term, and if Z is one, I get the sum of these 2 terms. 208 00:24:17.080 --> 00:24:21.470 David Stephens, Prof: so I can always write the outcome model for a binary treatment in this way. 209 00:24:23.600 --> 00:24:30.419 David Stephens, Prof: So let's suppose, instead of fitting that data generating model. I instead fit the 210 00:24:31.280 --> 00:24:34.030 David Stephens, Prof: propensity score regression model which looks like this. 211 00:24:34.300 --> 00:24:40.700 David Stephens, Prof: Right? So how is it constructed? It's got a general treatment-free part. 212 00:24:41.460 --> 00:24:44.970 David Stephens, Prof: and then it's z times the correct mu one. 213 00:24:46.000 --> 00:24:49.550 David Stephens, Prof: and then plus e times, also the correct mu one. 214 00:24:51.520 --> 00:24:52.220 David Stephens, Prof: Right? 215 00:24:52.680 --> 00:24:57.709 David Stephens, Prof: So if I know that the treatment effect is captured through that term. 216 00:24:58.500 --> 00:25:11.540 David Stephens, Prof: or I'm proposing that as the model, then I can fit this model right? And the key point is that I'm not specifying that mu, that sorry the M. 0 is the same as mu 0. 217 00:25:14.180 --> 00:25:18.769 David Stephens, Prof: Okay, so it turns out that if I fit this propensity score regression model. 218 00:25:22.550 --> 00:25:29.389 David Stephens, Prof: I can correctly recover the average treatment effect, even though M. 0 is misspecified. 219 00:25:31.020 --> 00:25:34.400 David Stephens, Prof: You can't get away with that misspecification in general. 220 00:25:34.870 --> 00:25:37.170 David Stephens, Prof: In the ordinary regression case. 221 00:25:39.270 --> 00:26:03.660 David Stephens, Prof: the average treatment effect here is just the average of the mu, one function over the X distribution. Right? Just see this. Treat this as a structural model. Set z equal to one set z equal to 0. Take expectations of the 2 things, and then take a difference. You just get mu one mu one of X in expectation. So the average treatment effect is this, and this propensity score regression model 222 00:26:03.900 --> 00:26:11.240 David Stephens, Prof: can recover that even if mu 0 is miss specified as M. 0. 223 00:26:13.740 --> 00:26:20.270 David Stephens, Prof: Okay, so provided I know mu one, and it correctly captures the treatment effect component. 224 00:26:20.600 --> 00:26:24.359 David Stephens, Prof: then I can miss specify mu 0 for M. 0, 225 00:26:24.500 --> 00:26:28.359 David Stephens, Prof: provided the propensity model is correctly specified 226 00:26:31.550 --> 00:26:42.699 David Stephens, Prof: all right. And again, the contention is that it is easier to specify this model the Z given X model than it is to specify this mu 0 model. 227 00:26:46.050 --> 00:26:51.120 David Stephens, Prof: Alright, and we'll see some numerical examples of this in operation later on. 228 00:26:55.110 --> 00:27:03.530 David Stephens, Prof: If you have an interaction between treatment and the covariance, then you have to do something slightly different. 229 00:27:04.140 --> 00:27:05.360 David Stephens, Prof: but related. 230 00:27:06.330 --> 00:27:10.299 David Stephens, Prof: So if you believe there's a treatment or a confounder 231 00:27:11.480 --> 00:27:18.800 David Stephens, Prof: treatment and confound or predictor interaction, let's say that the causal, the structural model, looked like this. 232 00:27:20.250 --> 00:27:22.690 David Stephens, Prof: where there's an interaction between Z 233 00:27:23.250 --> 00:27:28.799 David Stephens, Prof: and x. 1 say, captured through this. So psi 0 and psi one together 234 00:27:30.340 --> 00:27:33.960 David Stephens, Prof: are the unknown parameters capturing the treatment effect. 235 00:27:35.380 --> 00:27:52.869 David Stephens, Prof: then from this we can see we can still see that the average treatment effect depends on those parameters. If I treat this as the structural model, then I can see that the average treatment effect moving from Z equals 0 to Z equals. One is, psi 0 plus psi one times the expectation of x 1. 236 00:27:55.090 --> 00:27:57.890 David Stephens, Prof: Right? So that's the average treatment effect. 237 00:27:59.980 --> 00:28:07.499 David Stephens, Prof: If I don't allow myself to admit correct specification. But instead, I want to fit a propensity score regression model to recover that 238 00:28:08.390 --> 00:28:09.460 David Stephens, Prof: component. 239 00:28:09.680 --> 00:28:19.509 David Stephens, Prof: Then the propensity score model I have to fit is this one, that is, it's got an arbitrary intercept. 240 00:28:20.850 --> 00:28:26.160 David Stephens, Prof: It's got the correctly specified treatment effect part. 241 00:28:26.320 --> 00:28:31.930 David Stephens, Prof: And then it's got a parallel term 242 00:28:33.760 --> 00:28:36.230 David Stephens, Prof: that replaces Z by the propensity score. 243 00:28:36.910 --> 00:28:43.959 David Stephens, Prof: So, in fact, that's what we had here, right? We had z times mu one, and I had to match that with e times mu one. 244 00:28:45.270 --> 00:28:46.759 David Stephens, Prof: So if I've got 245 00:28:47.060 --> 00:28:53.179 David Stephens, Prof: z times. Psi, 0, plus psi. One times x 1. i need to have a corresponding E term. 246 00:28:54.920 --> 00:28:59.850 David Stephens, Prof: Okay? And then you fit this model using ols and 247 00:29:02.040 --> 00:29:10.429 David Stephens, Prof: take predictions from it. Under Z equals one Z equals 0. Take the average over the x's, and that gives you an estimate of the average treatment effect. 248 00:29:12.270 --> 00:29:26.240 David Stephens, Prof: So basically, for every term in Z, you need to have a corresponding term in ex. And again, that's to do with the independence that's induced when you fit the propensity score. 249 00:29:27.090 --> 00:29:33.620 David Stephens, Prof: I put a an example at the back here. 250 00:29:51.460 --> 00:29:53.949 David Stephens, Prof: got this example at the back here, which I've 251 00:29:54.110 --> 00:30:06.089 David Stephens, Prof: constructed to demonstrate this. And the key thing is that in here I've got some data generating examples. You can look through this. But the dag tells the story. If I go through the details here. 252 00:30:08.050 --> 00:30:18.400 David Stephens, Prof: basically, if we have an ordinary dag, then we need to block the open undirected pass between Z and y, which means putting a a term here which blocks the 253 00:30:20.110 --> 00:30:26.040 David Stephens, Prof: paths when I've got interactions in the model, I've got a more complicated structure that looks like this. 254 00:30:26.170 --> 00:30:31.840 David Stephens, Prof: But my task in inducing the propensity score or sorry introducing the propensity score is to block the 255 00:30:32.430 --> 00:30:35.930 David Stephens, Prof: open undirected paths between Z and Y. 256 00:30:36.620 --> 00:30:41.500 David Stephens, Prof: And what that means is that I have to build a model that looks like this, right? 257 00:30:42.170 --> 00:30:47.339 David Stephens, Prof: So you can look over the details. But that's basically the idea. I need to introduce the 258 00:30:49.180 --> 00:30:56.729 David Stephens, Prof: the terms as outlined here precisely to block all the right collection of paths. 259 00:30:59.750 --> 00:31:08.099 David Stephens, Prof: So this is the most general form of propensity. Score regression, it says, fit using ordinary, least squares, a model that looks like this 260 00:31:14.110 --> 00:31:20.550 David Stephens, Prof: in general. What we're going to have in the linear model case is a structural model 261 00:31:21.070 --> 00:31:23.189 David Stephens, Prof: that involves terms like this. 262 00:31:23.320 --> 00:31:26.989 David Stephens, Prof: So it's gonna have some term in 263 00:31:27.500 --> 00:31:30.479 David Stephens, Prof: x 0 and some parameters beta true, say. 264 00:31:31.180 --> 00:31:35.169 David Stephens, Prof: and then it's going to be z times x 2 times. Psi. 265 00:31:35.700 --> 00:31:39.589 David Stephens, Prof: which is the mu that we're interested in modeling. This is the structural model. 266 00:31:39.950 --> 00:31:49.420 David Stephens, Prof: But then, and if I had correct specification of that model, I could learn about the parameters of interest. 267 00:31:51.900 --> 00:31:59.199 David Stephens, Prof: But what the propensity score regression allows me to do is to miss specify this 1st component. So instead of having. 268 00:32:00.646 --> 00:32:03.699 David Stephens, Prof: Let's say, x 0 times beta true. 269 00:32:03.950 --> 00:32:11.300 David Stephens, Prof: which is the true data generating treatment-free part I instead fit x 1 times beta right? 270 00:32:13.300 --> 00:32:17.210 David Stephens, Prof: So I miss specify this part. Here 271 00:32:18.060 --> 00:32:22.039 David Stephens, Prof: I have the correctly specified treatment effect part. 272 00:32:22.290 --> 00:32:27.620 David Stephens, Prof: and then I have a matching term in the propensity score. 273 00:32:29.430 --> 00:32:33.770 David Stephens, Prof: So it turns out that this model will return 274 00:32:35.280 --> 00:32:43.330 David Stephens, Prof: consistent estimation of the psi parameter, and therefore the average treatment effect estimate, even if 275 00:32:43.510 --> 00:32:51.229 David Stephens, Prof: that treatment free part beta x. 1, beta one is Miss specified compared to the true data generating model. 276 00:32:54.240 --> 00:32:55.030 David Stephens, Prof: Okay? 277 00:32:57.250 --> 00:33:03.940 David Stephens, Prof: And the reason for that is easily explained in the following construction. If I imagine fitting this model 278 00:33:04.230 --> 00:33:07.120 David Stephens, Prof: by ordinarily least squares. I end up with this 279 00:33:07.660 --> 00:33:14.309 David Stephens, Prof: estimating system. It's a usual, the usual kind of construction that we have for ordinary lease squares. This is the 280 00:33:14.580 --> 00:33:20.970 David Stephens, Prof: the estimating function that I get by essentially taking the derivative of the of the quadratic that 281 00:33:21.170 --> 00:33:27.220 David Stephens, Prof: appears in the ordinary least squares formulation. Right? So I have to solve this equation 282 00:33:27.630 --> 00:33:32.779 David Stephens, Prof: for Beta, for psi and for for Phi 283 00:33:33.050 --> 00:33:40.840 David Stephens, Prof: right? That estimates the parameters. And then I get the average treatment effect by thinking about psi, right? So this is the system. 284 00:33:41.810 --> 00:33:46.819 David Stephens, Prof: Right solving. This produces the ordinary least square solution. 285 00:33:52.230 --> 00:33:59.029 David Stephens, Prof: If x 1 is equal to x 0 in that form right? So if I get correctly specified, 1st part. 286 00:33:59.290 --> 00:34:04.389 David Stephens, Prof: then, I have correct specification of the regression model, and I'm done. 287 00:34:05.910 --> 00:34:09.290 David Stephens, Prof: But if the mean model is misspecified. Then. 288 00:34:10.310 --> 00:34:16.179 David Stephens, Prof: provided the following conditions hold, I'm still going to get correct estimation of the average treatment effect. 289 00:34:16.830 --> 00:34:22.610 David Stephens, Prof: I need that the propensity score model is correctly specified, and I need that 290 00:34:23.840 --> 00:34:31.170 David Stephens, Prof: the random quantity formed as essentially the residual from the fitted regression model. 291 00:34:31.330 --> 00:34:35.079 David Stephens, Prof: I need that in reality that's independent of Z. 292 00:34:36.020 --> 00:34:42.369 David Stephens, Prof: That is, the whole of the Z influence is correctly captured by this component in the model. 293 00:34:43.389 --> 00:34:46.509 David Stephens, Prof: So I modeled the treatment effect part correctly. 294 00:34:49.150 --> 00:34:55.260 David Stephens, Prof: Okay. If I do that, then I get consistent estimation of psi. 295 00:34:55.800 --> 00:35:01.149 David Stephens, Prof: right? So I'm substituting the need for correct specification of the whole model 296 00:35:03.000 --> 00:35:06.200 David Stephens, Prof: by correct specification of the propensity score model 297 00:35:07.830 --> 00:35:10.870 David Stephens, Prof: and an assumption about the model for the treatment effect. 298 00:35:13.580 --> 00:35:31.549 David Stephens, Prof: So if you count up components that need to be correctly specified, it's still more or less the same. The idea is that I would contend, and causal inference. People would contend that specifying the propensity score model correctly is more straightforward than specifying the 299 00:35:31.980 --> 00:35:35.030 David Stephens, Prof: full outcome model correctly. 300 00:35:39.040 --> 00:35:39.760 David Stephens, Prof: So 301 00:35:41.280 --> 00:35:46.430 David Stephens, Prof: how does that come about? Well, if we go back to the estimating equation that I wrote down here. 302 00:35:47.360 --> 00:35:52.169 David Stephens, Prof: I need to solve this for Beta, psi, and Phi, in order to estimate those parameters. 303 00:35:52.970 --> 00:35:59.160 David Stephens, Prof: But this is just 3 equations, or 3 collections of equations, the axes of vectors here. 304 00:36:00.360 --> 00:36:08.630 David Stephens, Prof: I can just subtract the second equation. Sorry the 3rd equation from the second equation, right? 305 00:36:09.130 --> 00:36:10.759 David Stephens, Prof: And that gives me this system. 306 00:36:12.000 --> 00:36:14.559 David Stephens, Prof: Right? That's exactly the same system just 307 00:36:15.580 --> 00:36:25.280 David Stephens, Prof: with one equation subtracted from the other. I've still got 0 on the right hand side. So what that tells me is that solutions to this system 308 00:36:27.820 --> 00:36:30.479 David Stephens, Prof: are the same as the solutions to this system. 309 00:36:35.100 --> 00:36:37.440 David Stephens, Prof: Alright, good. So 310 00:36:39.040 --> 00:36:43.900 David Stephens, Prof: what good, what good does this do me? Well, it really is going to focus on this term here. 311 00:36:44.780 --> 00:36:45.305 David Stephens, Prof: Right? 312 00:36:46.120 --> 00:36:52.580 David Stephens, Prof: So what we have here is the treatment observed treatment minus the expected treatment 313 00:36:54.190 --> 00:37:02.590 David Stephens, Prof: in the binary case. It's the expected treatment. It's really the probability that treatment is equal to one given X, but it's the also the expected treatment. 314 00:37:03.530 --> 00:37:09.049 David Stephens, Prof: So the point is, if the correct lease, if if the propensity model is correctly specified. 315 00:37:09.560 --> 00:37:12.480 David Stephens, Prof: this term has got expectation 0. 316 00:37:15.290 --> 00:37:20.410 David Stephens, Prof: So what that does is to basically induce an unbiased estimating equation. 317 00:37:20.560 --> 00:37:25.980 David Stephens, Prof: even if certain components are correctly specified. That's going to be the key argument. 318 00:37:26.280 --> 00:37:44.070 David Stephens, Prof: If you don't follow the maths of this, don't worry too much. You can think of it just as a way of robustifying the outcome regression model that we started with. Okay. But what we've done here is effectively by the conditioning on E in the outcome regression 319 00:37:44.300 --> 00:37:47.099 David Stephens, Prof: we've in induced this 320 00:37:47.290 --> 00:37:57.920 David Stephens, Prof: an independence which is manifested by the fact that this residual is independent of this residual, basically 321 00:37:58.730 --> 00:38:04.680 David Stephens, Prof: all right. So inference flipside is correct, if at least one of the main model or the propensity model 322 00:38:04.960 --> 00:38:13.430 David Stephens, Prof: is correctly specified, provided that the treatment effect model is correctly specified. Right? So I must get this right. 323 00:38:15.920 --> 00:38:18.390 David Stephens, Prof: And then I can either get this right. 324 00:38:18.520 --> 00:38:19.900 David Stephens, Prof: All this right. 325 00:38:24.650 --> 00:38:30.719 David Stephens, Prof: It's the argument right? And this is a form of what's known as double robustness. 326 00:38:31.090 --> 00:38:34.989 David Stephens, Prof: So, provided I have one bit of the model correct. 327 00:38:35.350 --> 00:38:43.800 David Stephens, Prof: then I can either correctly specify one component or the other component right. 328 00:38:45.420 --> 00:38:50.889 David Stephens, Prof: Either the treatment-free part or the propensity score. 329 00:38:51.510 --> 00:38:56.479 David Stephens, Prof: and this approach will give me consistent estimation of the size, and therefore the average treatment effect. 330 00:38:58.950 --> 00:39:02.420 David Stephens, Prof: We can consider a reduced form of that previous equation. 331 00:39:03.660 --> 00:39:05.990 David Stephens, Prof: Now that we've seen that, that's the result 332 00:39:06.200 --> 00:39:10.580 David Stephens, Prof: and say, Well, okay, maybe I just fit this as the outcome regression. 333 00:39:11.670 --> 00:39:20.629 David Stephens, Prof: But I use the same kind of approach, don't justify it through ordinary least squares, but instead view it from an estimating equation point of view. 334 00:39:20.970 --> 00:39:24.460 David Stephens, Prof: So I fit a model which has a 335 00:39:24.730 --> 00:39:33.739 David Stephens, Prof: potentially misspecified treatment, free contribution and then a correctly specified treatment effect contribution. 336 00:39:34.350 --> 00:39:38.550 David Stephens, Prof: And then I use the same form of estimating equation as we just arrived. 337 00:39:40.910 --> 00:39:45.260 David Stephens, Prof: Notice that this estimating equation doesn't arise from the 338 00:39:45.400 --> 00:39:47.880 David Stephens, Prof: taking the derivative of the square 339 00:39:48.610 --> 00:39:55.709 David Stephens, Prof: that appears in the sum of squares to the ordinary least squares, because this term here 340 00:39:55.890 --> 00:39:59.780 David Stephens, Prof: is not the derivative of this term here with respect to psi. 341 00:40:03.280 --> 00:40:09.760 David Stephens, Prof: but it's inspired by the previous ordinarily squares construction. 342 00:40:10.030 --> 00:40:13.119 David Stephens, Prof: So it turns out that this approach still gives 343 00:40:13.740 --> 00:40:16.870 David Stephens, Prof: correct estimation of psi under the same conditions. 344 00:40:17.490 --> 00:40:19.309 David Stephens, Prof: I either that need to have 345 00:40:20.230 --> 00:40:31.229 David Stephens, Prof: E correctly specified or the treatment-free component, correctly specified. And again, this is double, robust, and it's known as the G estimation procedure. 346 00:40:34.570 --> 00:40:35.590 David Stephens, Prof: So 347 00:40:36.440 --> 00:40:49.490 David Stephens, Prof: the most basic form of this approach is when I just set this function here equal to 0. So I don't bother having an intercept. I just say that the outcome model is that the expected value of y 348 00:40:49.630 --> 00:40:51.659 David Stephens, Prof: when z is 0 is 0, 349 00:40:52.130 --> 00:40:58.150 David Stephens, Prof: and when z is one, it's xi times. Psi, xi. 2 times. Psi. 350 00:40:59.310 --> 00:41:08.740 David Stephens, Prof: So basically, if I don't have a term here, and I don't have an intercept a treatment free part, then the 1st equation goes, and I'm left only with the second equation, which is this. 351 00:41:10.740 --> 00:41:19.259 David Stephens, Prof: and if psi is a 1 dimensional quantity, just a psi 0. Say, then, that reduces to this estimating equation 352 00:41:20.020 --> 00:41:26.700 David Stephens, Prof: right? So again, my estimation of the average treatment effect will come down to solving this for psi. 0. 353 00:41:30.120 --> 00:41:32.399 David Stephens, Prof: Fortunately, that's easy. We can do that 354 00:41:32.830 --> 00:41:36.229 David Stephens, Prof: algebraically, very easily, and end up with this estimate. 355 00:41:37.870 --> 00:41:43.410 David Stephens, Prof: Right? So psi. 0, the psi 0. That solves this equation is easily seen to be. This 356 00:41:46.950 --> 00:41:53.220 David Stephens, Prof: corresponding estimator is the same thing, but with the lowercase letters replaced by uppercase letters. 357 00:41:54.200 --> 00:41:56.710 David Stephens, Prof: So this is the estimator we're going to use. 358 00:41:57.080 --> 00:42:03.130 David Stephens, Prof: And even though it's a very simple model, doesn't contain any. 359 00:42:03.520 --> 00:42:10.840 David Stephens, Prof: As any attempt to model the treatment free outcome component. 360 00:42:11.290 --> 00:42:13.200 David Stephens, Prof: It assumes that that's 0. 361 00:42:14.960 --> 00:42:21.230 David Stephens, Prof: Even, it's a simple model. We will still get consistent estimation of psi. 362 00:42:21.380 --> 00:42:24.869 David Stephens, Prof: provided the propensity score model is correctly specified. 363 00:42:30.600 --> 00:42:41.169 David Stephens, Prof: So this is G estimation. It's a slightly different version of propensity score regression, slightly different version from of regressing on the propensity score. We cannot 364 00:42:41.670 --> 00:42:44.319 David Stephens, Prof: view it as an ordinarily square system. 365 00:42:46.360 --> 00:42:50.010 David Stephens, Prof: It's still a valid valid linear system, though. 366 00:42:50.620 --> 00:43:00.750 David Stephens, Prof: and we can set up some numerical calculations to solve that linear system fairly easily. It's still matrix manipulation. It's just not the same as ordinary, least squares. 367 00:43:01.540 --> 00:43:03.509 David Stephens, Prof: It's related. But it's not the same. 368 00:43:05.370 --> 00:43:10.689 David Stephens, Prof: Okay, so we can extend that 369 00:43:10.940 --> 00:43:17.359 David Stephens, Prof: to a more so an attempt to double robustness by, if you notice here that the Y appears on its own. 370 00:43:17.490 --> 00:43:20.420 David Stephens, Prof: So we've got z minus e times y 371 00:43:20.800 --> 00:43:25.140 David Stephens, Prof: summed over z times z minus e summed. 372 00:43:27.490 --> 00:43:32.309 David Stephens, Prof: We can extend the model for y to have a go at a treatment free component. So it 373 00:43:33.610 --> 00:43:39.940 David Stephens, Prof: it's possible to build in extra efforts at modeling the 374 00:43:40.680 --> 00:43:45.749 David Stephens, Prof: treatment-free component here. We've done it through a linear model dependent on parameters, beta. 375 00:43:46.960 --> 00:43:51.220 David Stephens, Prof: which we estimate using ordinary least squares and then end up 376 00:43:51.350 --> 00:44:04.579 David Stephens, Prof: solving the the reduced equation to get this form for the single psi parameter in the treatment effect component. 377 00:44:06.370 --> 00:44:10.859 David Stephens, Prof: So G. Estimation can be extended to this double robust version. 378 00:44:13.790 --> 00:44:14.500 David Stephens, Prof: Okay? 379 00:44:19.750 --> 00:44:27.110 David Stephens, Prof: so what I think I'll do is that we're at quarter past 12 now. So so I think I'll break for 5 min here 380 00:44:27.240 --> 00:44:32.400 David Stephens, Prof: rather than break in a few minutes. Time. Break for 5 min here till 20 past the hour. 381 00:44:33.244 --> 00:44:36.780 David Stephens, Prof: And then we'll go on to the next method, which is waiting. 382 00:44:36.950 --> 00:44:42.080 David Stephens, Prof: which is another way of using the propensity score in causal adjustment. 383 00:44:42.779 --> 00:44:49.130 David Stephens, Prof: I'll I'll break here for for that 5 min. And 384 00:44:51.140 --> 00:45:01.439 David Stephens, Prof: if you have questions you can put them in the chat on what we've just discussed, we'll see examples of the implementation of the propensity, score regression and gestimation this afternoon, where it'll become 385 00:45:01.760 --> 00:45:09.760 David Stephens, Prof: maybe more apparent how these methods are are used, and what some of the properties are okay. Thanks. 386 00:51:32.260 --> 00:51:37.788 David Stephens, Prof: Okay. So gonna pick up again. Now, with some 387 00:51:38.400 --> 00:51:48.450 David Stephens, Prof: further methods based on the propensity score and good question in the chat about why we fit a regression model for the propensity score at the 1st stage. At least, I think that's what the question is. 388 00:51:48.630 --> 00:51:49.260 David Stephens, Prof: So 389 00:51:50.050 --> 00:51:59.669 David Stephens, Prof: we need correct specification of the model ex. Remember that the theory told us that the nice properties of the propensity score 390 00:51:59.940 --> 00:52:06.769 David Stephens, Prof: were based on the assumption that the true relationship between Z. And X is being captured. 391 00:52:08.510 --> 00:52:16.189 David Stephens, Prof: In reality, in most practical situations we won't know what the condition model for Z given X is, we won't know 392 00:52:16.370 --> 00:52:26.579 David Stephens, Prof: what the treatment assignment mechanism is. Precisely. We'll only get the observations of Z and X. We get those jointly in the observational setting. 393 00:52:26.830 --> 00:52:39.660 David Stephens, Prof: and therefore we need to learn as best as we can about that relationship by fitting a model for the propensity score fitting a model, fitting a regression model for Z, given X, say. 394 00:52:39.800 --> 00:52:47.210 David Stephens, Prof: and if Z is binary, that really just amounts to fitting a propensity propensical model based on a logistic regression. 395 00:52:47.810 --> 00:52:52.969 David Stephens, Prof: yeah, some other binary regression form, and then 396 00:52:53.320 --> 00:53:04.420 David Stephens, Prof: we are guaranteed to get correct inference, at least asymptotically, provided that specification of the regression model for Z given X is correct 397 00:53:04.540 --> 00:53:09.330 David Stephens, Prof: right. So we are capturing at least up to a pat, to an unknown parameter. 398 00:53:09.530 --> 00:53:21.130 David Stephens, Prof: the nature of the relationship between Z and X. So that's why we fit the propensity score at the 1st stage. If we were lucky enough to know the true relationship between Z. Given X, we could use that as well, although 399 00:53:21.580 --> 00:53:30.900 David Stephens, Prof: there are some results to say that even if we knew what that relationship was exactly, it would still be better to do an adaptive version that uses the fitted 400 00:53:31.320 --> 00:53:33.649 David Stephens, Prof: propensity score based on some 401 00:53:33.870 --> 00:53:41.569 David Stephens, Prof: model. That would be the case in some parametric settings, for example. But I'll maybe touch on that. And one later in one later part. 402 00:53:42.060 --> 00:53:44.359 David Stephens, Prof: Okay? So hopefully that answers the question there. 403 00:53:45.730 --> 00:53:49.179 David Stephens, Prof: So this is regressing, regressing on the propensity score. 404 00:53:52.210 --> 00:54:03.450 David Stephens, Prof: We're now going to look at waiting methods. So weighting methods also use the propensity score, but they use the propensity score to account for or to adjust for confounding in a different way. 405 00:54:05.020 --> 00:54:14.860 David Stephens, Prof: So I'm going to give the justification of this method the way I think about it, anyway. And it's going to be analogous to a 406 00:54:15.280 --> 00:54:19.950 David Stephens, Prof: Monte Carlo method mentioned mentioned yesterday, known as important sampling. 407 00:54:20.120 --> 00:54:28.309 David Stephens, Prof: and I think it's at least I find it useful to understand where the inverse, the probability weighting methods come from 408 00:54:28.690 --> 00:54:41.789 David Stephens, Prof: before sort of going on to look at the statistical implementation on the properties. So the average potential outcome for treatment at level Z is, as we saw yesterday, this expectation here. Right? This is the the true 409 00:54:42.240 --> 00:54:44.960 David Stephens, Prof: value. The S demand in our problem. 410 00:54:45.350 --> 00:54:52.200 David Stephens, Prof: And what we want to see is how we can estimate that from observational data. Well, in the waiting approaches 411 00:54:52.810 --> 00:55:01.380 David Stephens, Prof: we don't achieve the adjustment for confounding by balancing or matching. Instead, we do it by reweighting. 412 00:55:05.830 --> 00:55:09.039 David Stephens, Prof: And this is the argument basically. 413 00:55:09.620 --> 00:55:16.360 David Stephens, Prof: So remember that the expectation that we want to compute is actually this one. 414 00:55:18.950 --> 00:55:26.809 David Stephens, Prof: Okay? And then under no measure confounding it simplifies to this 415 00:55:28.040 --> 00:55:30.059 David Stephens, Prof: right? And this gives us then, the 416 00:55:30.600 --> 00:55:37.119 David Stephens, Prof: G estimation formula, right? So and then the argument here is that well, we're gonna sample from 417 00:55:37.590 --> 00:55:39.149 David Stephens, Prof: essentially this 418 00:55:40.240 --> 00:55:52.320 David Stephens, Prof: and average these. In order to get an estimate of this, this is how frequenty statistics works right, collect the sample, get the numerical values average them that estimates the expectation. 419 00:55:53.950 --> 00:55:58.330 David Stephens, Prof: The problem here is that we don't have a sample from the right distribution. 420 00:55:59.080 --> 00:56:05.439 David Stephens, Prof: Here we've got what is essentially an estimate defined in terms of the experimental distribution. 421 00:56:06.040 --> 00:56:11.700 David Stephens, Prof: Right? So if we did have data from the experimental distribution, we would just average them 422 00:56:12.120 --> 00:56:17.620 David Stephens, Prof: to get an estimate. An estimator here of the of the true average potential outcome. 423 00:56:17.810 --> 00:56:22.859 David Stephens, Prof: Right? And we do that for every little Red Z that was appropriate. 424 00:56:26.570 --> 00:56:29.269 David Stephens, Prof: So in the randomized or experimental study. 425 00:56:29.490 --> 00:56:44.410 David Stephens, Prof: The causal problem is solved, and we essentially implement an expectation. Computation here, by averaging the observed samples. 426 00:56:45.290 --> 00:56:51.250 David Stephens, Prof: the observed wise selecting only those zs 427 00:56:52.570 --> 00:56:56.830 David Stephens, Prof: that match the true Z. So we've seen this formula before. 428 00:56:57.070 --> 00:57:00.010 David Stephens, Prof: This was justified by the 429 00:57:04.020 --> 00:57:13.239 David Stephens, Prof: The earlier calculation, or this this formula for the estimator was justified by the earlier calculation, and essentially what it says here is 430 00:57:13.800 --> 00:57:20.770 David Stephens, Prof: for each target. Z level, compute the sample mean for wise. 431 00:57:21.160 --> 00:57:28.369 David Stephens, Prof: Where that target Z is the same as the observed Z. So just pick off the treated 432 00:57:28.500 --> 00:57:32.059 David Stephens, Prof: average of the wise, pick off the untreated average of the wise. 433 00:57:32.180 --> 00:57:37.500 David Stephens, Prof: That's what this formula says, under the experiment setting, that's going to work fine 434 00:57:38.070 --> 00:57:44.590 David Stephens, Prof: right? There is no confounding. This estimator will give us consistent estimation of the average potential outcome. 435 00:57:44.860 --> 00:57:57.249 David Stephens, Prof: We saw a slightly simpler version where, instead of in the numerator having the actual number of 436 00:57:59.570 --> 00:58:04.699 David Stephens, Prof: individuals who had that treatment level, we have instead the expected number. 437 00:58:05.830 --> 00:58:09.880 David Stephens, Prof: So we've got 2 possible estimators which are both consistent. 438 00:58:12.450 --> 00:58:18.449 David Stephens, Prof: Okay, the reason for looking at this second estimator 439 00:58:20.170 --> 00:58:29.689 David Stephens, Prof: is that it's more straightforward to understand its statistical properties, because here we've got all the random variables in the sum. So, studying the 440 00:58:29.690 --> 00:58:50.640 David Stephens, Prof: properties of sums of random variables very straightforward, we've got things like the central limit, theorem, and so on. Laws of large numbers, and so on. So that is pretty straightforward this one, which is a perhaps a more obvious estimated use. That is the sample mean of those people observed to be treated, or those people observed to be not treated 441 00:58:52.560 --> 00:59:08.380 David Stephens, Prof: where we've got a contribution here which counts the number of individuals who were treated or not treated. This is a more obvious estimator, but because it's got random variables in the numerator and random variables in the denominator. It's a bit of a more difficult statistic to study. 442 00:59:10.480 --> 00:59:14.390 David Stephens, Prof: Okay, so we can still use this estimated, but to understand the 443 00:59:14.940 --> 00:59:27.580 David Stephens, Prof: sampling distribution, and so on, is more complicated. So sometimes this one is preferred on that basis. It doesn't mean it's a better estimator. In fact, it's often not a better estimator in terms of 444 00:59:27.810 --> 00:59:31.120 David Stephens, Prof: variance. But it's an easier estimator to study. 445 00:59:34.130 --> 00:59:38.104 David Stephens, Prof: Okay? So of course, the problem is then 446 00:59:40.670 --> 00:59:44.109 David Stephens, Prof: that we don't have data from the experimental study. 447 00:59:44.490 --> 00:59:49.229 David Stephens, Prof: So, as we saw in yesterday's lectures lecture, we 448 00:59:49.380 --> 00:59:56.820 David Stephens, Prof: will not get correct estimation of the average potential outcome or the average treatment effect by doing this if we have confounding 449 00:59:57.570 --> 00:59:59.090 David Stephens, Prof: and an observational study. 450 01:00:00.490 --> 01:00:05.760 David Stephens, Prof: So to understand how inverse probability weighting works, I want to point out that 451 01:00:06.120 --> 01:00:10.160 David Stephens, Prof: the expectation that we've just computed as a particular representation 452 01:00:10.380 --> 01:00:15.659 David Stephens, Prof: in terms of the ratio of 2 expectations. So the average potential outcome 453 01:00:16.550 --> 01:00:22.349 David Stephens, Prof: is really the expectation under the experimental distribution 454 01:00:26.110 --> 01:00:31.510 David Stephens, Prof: of y conditional on z right? 455 01:00:31.680 --> 01:00:33.540 David Stephens, Prof: So again, if you 456 01:00:33.940 --> 01:00:44.850 David Stephens, Prof: don't understand where that comes from, it doesn't matter too much, we'll just follow through with the argument, and then we'll see where inverse probability waiting comes in later on. But basically it's saying that if we had this experimental 457 01:00:47.410 --> 01:00:49.480 David Stephens, Prof: study, this was the design. 458 01:00:49.860 --> 01:00:57.750 David Stephens, Prof: then I can genuinely write this expected counterfactual outcome as this conditional expectation 459 01:00:58.730 --> 01:01:03.410 David Stephens, Prof: right? And that allows me to not have to worry about 460 01:01:05.430 --> 01:01:12.749 David Stephens, Prof: slightly slightly arcane things like the counterfactual outcome, and allows me to phrase everything in terms of the observable quantities. 461 01:01:13.440 --> 01:01:13.790 David Stephens, Prof: Right? 462 01:01:14.290 --> 01:01:19.999 David Stephens, Prof: So this expectation can be rewritten. As this ratio, it turns out 463 01:01:20.210 --> 01:01:28.530 David Stephens, Prof: the numerator is the expectation over the experimental distribution of the indicator which picks off 464 01:01:29.030 --> 01:01:34.999 David Stephens, Prof: zeds that match the target Z multiply by y over the 465 01:01:37.040 --> 01:01:41.000 David Stephens, Prof: expected value of the indicator of just the pickoff function. 466 01:01:42.370 --> 01:01:48.389 David Stephens, Prof: Okay? And in fact, it's this formula, which is a mathematical formula for this conditional expectation 467 01:01:48.540 --> 01:01:50.450 David Stephens, Prof: gives inspiration for this 468 01:01:50.570 --> 01:01:57.490 David Stephens, Prof: formula here. Right? So the idea is, if you're going to estimate this from data, you replace the expectations by averages. 469 01:01:57.970 --> 01:02:06.319 David Stephens, Prof: So you're averaging this over the observed data and averaging this over the observed data to get the estimator 470 01:02:07.550 --> 01:02:09.350 David Stephens, Prof: and then taking the ratio. 471 01:02:12.340 --> 01:02:16.070 David Stephens, Prof: Okay, if we had experimental data, that would be fine. 472 01:02:16.550 --> 01:02:21.290 David Stephens, Prof: But we don't have experimental data. We have observational data. 473 01:02:21.980 --> 01:02:23.889 David Stephens, Prof: And what that means is that 474 01:02:24.620 --> 01:02:27.740 David Stephens, Prof: the distribution that pertains is different. 475 01:02:29.270 --> 01:02:32.229 David Stephens, Prof: Before we had Z and X independent. 476 01:02:32.560 --> 01:02:38.529 David Stephens, Prof: due to the experimental design. We were randomly assigning treatments, a irrespective of X, 477 01:02:39.300 --> 01:02:44.199 David Stephens, Prof: but in the observational setting we don't have that. We instead have a joint structure for X and Z. 478 01:02:45.310 --> 01:02:53.639 David Stephens, Prof: So our target is framed, phrased in terms of the experimental distribution. Curly E, 479 01:02:55.070 --> 01:03:01.260 David Stephens, Prof: but we have data from the observational distribution. Curly. O, 480 01:03:02.870 --> 01:03:08.429 David Stephens, Prof: so it looks on the surface as if we don't have the right data to make inference about the target that we're interested in. 481 01:03:11.200 --> 01:03:11.970 David Stephens, Prof: Right? 482 01:03:12.900 --> 01:03:19.020 David Stephens, Prof: Well, inverse probability. Waiting gives us a solution. 483 01:03:20.440 --> 01:03:36.870 David Stephens, Prof: Oh, so yeah, so just to draw the distinction again, the experimental relationship is here. No arrow from X to Z. The observational is here, where there is an arrow from x to Z. The difference in the 2 distributions, therefore, is highlighted only in this second term. 484 01:03:37.210 --> 01:03:37.710 David Stephens, Prof: right. 485 01:03:38.540 --> 01:03:42.709 David Stephens, Prof: The distribution of Y given x and Z is the same in both models. 486 01:03:43.800 --> 01:03:48.820 David Stephens, Prof: The distribution of X is the same in both models, but what differs is 487 01:03:49.950 --> 01:03:54.659 David Stephens, Prof: the distribution of the treatment assignment in the experimental. 488 01:03:55.530 --> 01:03:59.030 David Stephens, Prof: There's no dependence on axe in the observational. 489 01:03:59.320 --> 01:04:01.060 David Stephens, Prof: There is a dependence on X. 490 01:04:01.910 --> 01:04:06.299 David Stephens, Prof: So these 2 joint distributions are the same apart from this middle component. 491 01:04:10.280 --> 01:04:18.859 David Stephens, Prof: So where does inverse probability, rating comes in, come in? Well, it is achieved by 492 01:04:20.230 --> 01:04:25.630 David Stephens, Prof: rewriting the expectation of interest in terms of the experimental distribution 493 01:04:27.350 --> 01:04:34.990 David Stephens, Prof: instead, as an expectation of the observational distribution. That is, we do a what's called a change of measure or important sampling. 494 01:04:35.220 --> 01:04:43.349 David Stephens, Prof: reweighting to say that instead of using this expectation here, this ratio of expectations here. 495 01:04:44.040 --> 01:04:51.869 David Stephens, Prof: with respect to the experimental distribution, we instead write it with respect to the observational. 496 01:04:52.890 --> 01:04:57.540 David Stephens, Prof: and we do that by introducing a weight which depends on XY, and Z, generally 497 01:04:57.750 --> 01:04:59.680 David Stephens, Prof: in in general. Sorry. 498 01:05:00.020 --> 01:05:09.930 David Stephens, Prof: Okay. And that follows by the important sampling argument which basically says, or indeed, so in probability terms, it's called the change of measure argument 499 01:05:11.869 --> 01:05:20.219 David Stephens, Prof: under certain conditions which I'll elaborate on in a second, we can rewrite the target expectation entirely in terms of the observational 500 01:05:20.600 --> 01:05:21.690 David Stephens, Prof: distribution. 501 01:05:22.370 --> 01:05:31.730 David Stephens, Prof: We introduce this weight function where the weight is basically the ratio of the 2 densities right? 502 01:05:32.000 --> 01:05:33.320 David Stephens, Prof: It turns out 503 01:05:34.010 --> 01:05:44.459 David Stephens, Prof: using actually fairly straightforward probability arguments that I still have the expectation of the target correctly computed. If I take this ratio. 504 01:05:45.330 --> 01:05:49.540 David Stephens, Prof: So W. The weighting that I have to use is this ratio. Here. 505 01:05:50.450 --> 01:05:52.230 David Stephens, Prof: let's look at that in more detail. 506 01:05:52.490 --> 01:05:57.139 David Stephens, Prof: I break it down into 3 terms, turn by term. 507 01:05:57.590 --> 01:06:01.920 David Stephens, Prof: and then notice that the 1st term is one 508 01:06:03.200 --> 01:06:13.200 David Stephens, Prof: for all XY, and Z. And that's because if I think about the difference between these 2 dags. The way that X and Z get together to form Y is the same 509 01:06:13.400 --> 01:06:14.780 David Stephens, Prof: in the 2 models. 510 01:06:15.220 --> 01:06:18.439 David Stephens, Prof: The only thing I'm changing is the Xz relationship. 511 01:06:19.400 --> 01:06:22.889 David Stephens, Prof: But once I've got X and ZI form y in the same way. 512 01:06:24.530 --> 01:06:28.330 David Stephens, Prof: irrespective of whether I'm over here or over here. 513 01:06:30.460 --> 01:06:33.049 David Stephens, Prof: So what that tells me is that 514 01:06:33.510 --> 01:06:41.850 David Stephens, Prof: these 2 densities are the same. So in the ratio, I can just cancel them out that follows. 515 01:06:43.259 --> 01:06:49.539 David Stephens, Prof: Under the known metric founders. Assumption which basically allows me to draw the dags in the way that I did previously. 516 01:06:51.050 --> 01:06:54.030 David Stephens, Prof: All right for the 3rd term. 517 01:06:55.610 --> 01:07:02.390 David Stephens, Prof: This is also one right, and the reason for that is that I'm assuming the same. 518 01:07:02.740 --> 01:07:05.979 David Stephens, Prof: Confound a distribution in the 2 cases. 519 01:07:06.770 --> 01:07:11.540 David Stephens, Prof: Again, I'm not changing the distribution of X. That's my target population. 520 01:07:12.200 --> 01:07:16.100 David Stephens, Prof: I'm only changing how X influences Z in the 2 cases. 521 01:07:16.500 --> 01:07:20.360 David Stephens, Prof: So the marginal distribution of Z of X. Sorry 522 01:07:21.510 --> 01:07:25.700 David Stephens, Prof: is the same for the 2 models, the experimental and the observational. 523 01:07:26.280 --> 01:07:32.020 David Stephens, Prof: So again, that cancels, and what I'm left with is only the middle term. 524 01:07:32.510 --> 01:07:41.179 David Stephens, Prof: So that middle term the second term there is the ratio of these 2 things. It's the essentially the probability of getting a treatment 525 01:07:42.130 --> 01:07:52.070 David Stephens, Prof: taken over the conditional probability of getting that treatment for a given acts right. 526 01:07:52.960 --> 01:08:00.440 David Stephens, Prof: and it turns out that the the critical part is really the term in the denominator, because this, in a sense, measures 527 01:08:00.960 --> 01:08:04.290 David Stephens, Prof: the extent of the confounding right. 528 01:08:04.590 --> 01:08:10.029 David Stephens, Prof: This is the conditional distribution of treatment given given confounders. 529 01:08:11.670 --> 01:08:15.969 David Stephens, Prof: Okay, so basically captures how X predicts Z, 530 01:08:16.899 --> 01:08:21.530 David Stephens, Prof: which is, of course, exactly what we looked at when we looked at the propensity score. 531 01:08:21.740 --> 01:08:22.200 David Stephens, Prof: Right? 532 01:08:23.569 --> 01:08:32.809 David Stephens, Prof: As I'll mention again. And as we go through, this is not actually the propensity score, because the propensity score is the probability that Z equals one, say. 533 01:08:33.270 --> 01:08:42.699 David Stephens, Prof: for the binary treatment case, whereas this is dependent on the level. Z. Now, in this formula, here I'm going to pick off the Z's 534 01:08:42.970 --> 01:08:50.000 David Stephens, Prof: that match the target Z, so here, I'm always going to be computing this for the target Z basically 535 01:08:50.740 --> 01:08:52.130 David Stephens, Prof: for the target is that 536 01:08:55.729 --> 01:08:57.819 David Stephens, Prof: when it comes into the full calculation. 537 01:08:58.120 --> 01:09:00.910 David Stephens, Prof: and this term accounts for the imbalance. 538 01:09:02.420 --> 01:09:12.099 David Stephens, Prof: Though we noted extensively yesterday the difference between the X distribution for the 2 Z groups. 539 01:09:16.850 --> 01:09:20.390 David Stephens, Prof: Term tells us about the extent of the confounding. 540 01:09:20.790 --> 01:09:32.400 David Stephens, Prof: It tells us how far our observation on a particular scale tells us how far our observational study is from being a hypothetical, idealized. 541 01:09:33.220 --> 01:09:37.250 David Stephens, Prof: randomized trial, random randomized study, experimental study. 542 01:09:38.830 --> 01:09:39.500 David Stephens, Prof: Okay. 543 01:09:42.870 --> 01:09:52.229 David Stephens, Prof: so this suggests, then, on the basis of this formula. Here, this suggests 2 new forms of estimator. 544 01:09:52.560 --> 01:09:58.940 David Stephens, Prof: It suggests either this form or this form. Right? So what I've got here is the weight 545 01:09:59.660 --> 01:10:08.610 David Stephens, Prof: multiplied by y averaged overall. And oh, I've got so wait 546 01:10:09.070 --> 01:10:12.030 David Stephens, Prof: multiplied by Y over the sum of the weights. 547 01:10:18.800 --> 01:10:19.810 David Stephens, Prof: So 548 01:10:20.100 --> 01:10:27.869 David Stephens, Prof: it turns out that the expected value of the sum of the weights is N. So this is again like that previous kind of method where the 549 01:10:29.450 --> 01:10:33.670 David Stephens, Prof: sample mean in the observed, treated, and observed 550 01:10:34.800 --> 01:10:41.759 David Stephens, Prof: untreated groups had a denominator term which is essentially counting the number of individuals who were treated and who were not treated 551 01:10:42.060 --> 01:10:46.459 David Stephens, Prof: here. We've got more or less the same thing here. I'm saying that 552 01:10:47.830 --> 01:10:52.380 David Stephens, Prof: I'm going to take a straight average of these weighted outcomes 553 01:10:52.970 --> 01:10:56.140 David Stephens, Prof: here, I'm going to say, well, the weight is actually 554 01:10:56.820 --> 01:11:01.209 David Stephens, Prof: the same inverse probability weight here divided by the sum of those weights. 555 01:11:01.400 --> 01:11:08.149 David Stephens, Prof: So this is a more standard kind of weighting where all the weights are positive, and they sum to one. 556 01:11:09.890 --> 01:11:11.390 David Stephens, Prof: We don't have that here. 557 01:11:15.090 --> 01:11:19.809 David Stephens, Prof: So both of these estimators, it turns out I'm going to call them Ipw. 0 and Ipw. 558 01:11:20.730 --> 01:11:22.990 David Stephens, Prof: Indicated by Tilde and Hat. 559 01:11:23.460 --> 01:11:36.060 David Stephens, Prof: Both of those methods, both of those estimators will give me consistent estimation of the average potential outcome, provided 560 01:11:36.360 --> 01:11:45.760 David Stephens, Prof: this observational model, Z. Given X is correctly specified. 561 01:11:48.990 --> 01:11:54.659 David Stephens, Prof: So that's the parallel of the correct specification of the propensity score that we saw earlier on. 562 01:11:57.490 --> 01:12:06.419 David Stephens, Prof: Okay, so inverse waiting then operates to change the probability measure 563 01:12:09.610 --> 01:12:13.140 David Stephens, Prof: that allow, and allows us to use the observed data 564 01:12:13.660 --> 01:12:20.430 David Stephens, Prof: to compute an expectation by taking a sample average for a target quantity 565 01:12:20.630 --> 01:12:25.990 David Stephens, Prof: that's defined in terms of a different distribution, the experimental distribution. 566 01:12:26.590 --> 01:12:35.090 David Stephens, Prof: So the reweighting achieves that, and you can think of it as operating by constructing a pseudopulation in which 567 01:12:35.490 --> 01:12:42.079 David Stephens, Prof: the confounders are balanced right, so by reweighting each individual by the inverse of the 568 01:12:42.700 --> 01:12:44.540 David Stephens, Prof: F of Z. Given X. 569 01:12:44.800 --> 01:12:49.240 David Stephens, Prof: We are imagining a pseudo population 570 01:12:49.960 --> 01:12:52.819 David Stephens, Prof: in which the confounding is removed. 571 01:12:53.700 --> 01:12:59.920 David Stephens, Prof: So in the reweighted sample, let's say we should observe balance 572 01:13:00.720 --> 01:13:03.250 David Stephens, Prof: in the axis by treatment group. 573 01:13:05.350 --> 01:13:06.150 David Stephens, Prof: Okay. 574 01:13:07.950 --> 01:13:18.599 David Stephens, Prof: the term in the denominator is, of course, is, of course, defined by the exposure model the treatment model, and in the binary case it reduces to a function of the propensity score. 575 01:13:20.960 --> 01:13:23.200 David Stephens, Prof: So we can think of this as a way of 576 01:13:23.300 --> 01:13:31.639 David Stephens, Prof: utilizing the propensity score, not by regression, but instead by inverse waiting. 577 01:13:32.580 --> 01:13:38.260 David Stephens, Prof: Okay. Now, I mentioned that these estimators give 578 01:13:38.380 --> 01:13:43.040 David Stephens, Prof: consistent estimation of the average treatment effect the well, the apo, and then the treatment effect. 579 01:13:43.887 --> 01:13:52.309 David Stephens, Prof: I noticed that the only requirement is the correct specification of the treatment model the treatment assignment model. 580 01:13:53.080 --> 01:14:00.550 David Stephens, Prof: And that's unlike the regression cases that we saw earlier, on which also required us. 581 01:14:01.100 --> 01:14:07.149 David Stephens, Prof: So it required correct specification of the propensive score, certainly, but also it required us to capture the 582 01:14:07.360 --> 01:14:21.580 David Stephens, Prof: nature of the treatment effect model correctly. So I needed to know it was z times psi, or something. Z times. Psi, 0. Okay, so here, I don't have that second assumption here. I only have an assumption about the treatment assignment mechanism. 583 01:14:26.450 --> 01:14:29.579 David Stephens, Prof: One important condition that's required, though, is that 584 01:14:30.120 --> 01:14:34.070 David Stephens, Prof: we were we when we perform that change of measure 585 01:14:34.230 --> 01:14:41.789 David Stephens, Prof: calculation that allows us to use the observational data to estimate the experimental quantity we need that 586 01:14:42.970 --> 01:14:45.719 David Stephens, Prof: the term in the denominator is non-zero 587 01:14:45.850 --> 01:14:53.460 David Stephens, Prof: whenever we need to use it, which basically means that the probability of being treated at level Z 588 01:14:53.940 --> 01:14:57.500 David Stephens, Prof: given X is positive for all Z and x. 589 01:14:58.200 --> 01:15:03.830 David Stephens, Prof: so that's called a positivity assumption, or sometimes the experimental treatment, assignment, assumption. 590 01:15:04.500 --> 01:15:27.039 David Stephens, Prof: and what that boils down to is to say that for any individual we cannot know their treatment status with certainty before we see the treatment it has to be stochastic. It has to be a probabilistic treatment assignment that we're observing right? It can't be, let's say, in the binary treatment case that, given X, the probability of treatment is one. 591 01:15:28.150 --> 01:15:31.099 David Stephens, Prof: The probability of no treatment is one we can't have that. 592 01:15:31.300 --> 01:15:33.950 David Stephens, Prof: That would be a violation of what's called positivity. 593 01:15:36.590 --> 01:15:40.749 David Stephens, Prof: Okay, so that's the inverse probability. Weighting approach. 594 01:15:41.490 --> 01:15:47.410 David Stephens, Prof: Related method to this is, offers some form of improvement through some 595 01:15:48.570 --> 01:16:18.170 David Stephens, Prof: attempt at conditional, mean modeling. So we can combine the regression, approach with the inverse weighting approach, and this is called augmentation. Augmentation operates by saying, Well, we can write the target parameter by doing this telescoping sum argument, so I can write the expectation of Yz as expectation of yz minus mu plus mu, and then taking expectations. Where mu is the proposed data generating conditional outcome model. 596 01:16:18.900 --> 01:16:26.599 David Stephens, Prof: a kind of model that we would use in a regression analysis if we wanted to do a regression estimation of the average treatment effect. 597 01:16:27.120 --> 01:16:35.519 David Stephens, Prof: Okay, so augmented, Ipw or aipw operates by performing that telescoping 598 01:16:36.190 --> 01:16:44.305 David Stephens, Prof: expression telescoping, because obviously, I'm subtracting something and then adding it back in okay. 599 01:16:45.180 --> 01:16:48.700 David Stephens, Prof: it proceeds by estimating the 1st term 600 01:16:48.870 --> 01:16:51.850 David Stephens, Prof: from the sample, using them as probability weighting. 601 01:16:53.470 --> 01:16:57.379 David Stephens, Prof: and then estimates the second term by ordinary sample averaging. 602 01:16:59.390 --> 01:17:06.499 David Stephens, Prof: So this is called the augmented Ipw estimator. And the idea is, basically, if we can have some good 603 01:17:06.670 --> 01:17:13.610 David Stephens, Prof: proposal for Mu, then we'll get a better estimator by that little extra bit of modeling. 604 01:17:14.170 --> 01:17:17.910 David Stephens, Prof: We will get a better estimator of the average potential outcome. 605 01:17:18.930 --> 01:17:23.350 David Stephens, Prof: Okay? In fact, if we have a correctly specified Mu. 606 01:17:24.340 --> 01:17:29.350 David Stephens, Prof: then the resulting estimator is the best inverse probability weighting estimator. 607 01:17:29.850 --> 01:17:38.739 David Stephens, Prof: But of course, if we had correct specification of Mu, we could just use outcome regression and just regress on mu or use the regression model based on Mu 608 01:17:39.080 --> 01:17:46.880 David Stephens, Prof: and do outcome regression, and that would also be the best estimator, not in the Ipw class, but the best estimator of the average potential outcome. 609 01:17:50.110 --> 01:17:54.629 David Stephens, Prof: In that case, then, if both the propensity model and the 610 01:17:56.090 --> 01:18:00.380 David Stephens, Prof: conditional mean model are correctly specified, then we can prove 611 01:18:00.550 --> 01:18:05.949 David Stephens, Prof: that the variance of the IP aipw estimator of the average 612 01:18:06.330 --> 01:18:14.840 David Stephens, Prof: potential outcome is lower than the variance of the ordinary Ipw estimator where essentially Mu is set to 0. 613 01:18:15.100 --> 01:18:21.059 David Stephens, Prof: Right? So the idea is that we're going to propose this model. It's going to be some form of regression model. 614 01:18:21.320 --> 01:18:31.579 David Stephens, Prof: And we're going to combine the estimator 2 estimators together, and that combined estimator has an effect of reducing the variance of the overall estimator. 615 01:18:32.620 --> 01:18:42.499 David Stephens, Prof: Okay, this method is also what's called doubly robust. If we use this form of estimator, then we get a consistent estimation of the average potential outcome. 616 01:18:42.730 --> 01:18:45.829 David Stephens, Prof: Even if one of those models is misspecified. 617 01:18:46.300 --> 01:18:50.940 David Stephens, Prof: either the treatment assignment model or the conditional mean model. 618 01:18:51.680 --> 01:18:54.430 David Stephens, Prof: So that's a different form of double robustness. 619 01:18:55.540 --> 01:19:02.909 David Stephens, Prof: Notice that in this specification I don't need to have correct specification of the 620 01:19:04.110 --> 01:19:10.389 David Stephens, Prof: effect of Z on Y right, which I did need an ordinary propensity score regression. 621 01:19:11.180 --> 01:19:11.860 David Stephens, Prof: Right? 622 01:19:12.370 --> 01:19:15.630 David Stephens, Prof: So it's possible that both of these models are Miss specified. 623 01:19:22.340 --> 01:19:32.539 David Stephens, Prof: I don't have the true treatment assignment model. I don't have the true conditional, mean model. I can still form this estimator, and it would look like this where wiz is. 624 01:19:32.940 --> 01:19:36.730 David Stephens, Prof: I Bracket Z 625 01:19:37.040 --> 01:19:45.069 David Stephens, Prof: said. So this basically is the indicator function which picks off those people that were treated at the target level. 626 01:19:45.750 --> 01:19:52.920 David Stephens, Prof: weights them by one over F, and then waits. The 627 01:19:54.070 --> 01:19:59.620 David Stephens, Prof: averages the the weighted versions of the residual from 628 01:20:00.570 --> 01:20:03.739 David Stephens, Prof: proposed residual from the regression of Y on m. 629 01:20:06.190 --> 01:20:13.029 David Stephens, Prof: and then adds onto that this additional term, which is the average of the ordinary regression prediction. 630 01:20:13.710 --> 01:20:26.609 David Stephens, Prof: So you can see sort of how this method is working. It's saying, Well, okay, if M. Is almost correct, then most of these terms here are going to be 0 or close to 0, and all of my estimation is going to come from this. 631 01:20:27.240 --> 01:20:31.159 David Stephens, Prof: But if M. Is misspecified. 632 01:20:31.530 --> 01:20:38.329 David Stephens, Prof: then I'm going to get a large contribution here. But that's going to be canceled out by the residuals that come from this component. That's the logic 633 01:20:38.910 --> 01:20:39.590 David Stephens, Prof: roughly. 634 01:20:42.170 --> 01:20:57.310 David Stephens, Prof: So, we can quantify the bias of that estimator in terms of the core components. So the bias of the resulting estimator reflects the misspecification in the propensity score model or the treatment assignment model and the miss specification of the mean model. 635 01:21:00.270 --> 01:21:11.100 David Stephens, Prof: Okay? So it's the product of those residuals or miss Misfits weighted by the misfitting 636 01:21:12.380 --> 01:21:23.610 David Stephens, Prof: or the misfit treatment assignment model. Right? So that's the bias of the estimator. And the reason for pointing this out is that it'll it allows us to notice that each of the functions play a 637 01:21:24.180 --> 01:21:34.490 David Stephens, Prof: a role we can think of this as saying Miss specified F over true F, divided by Miss specified F, or multiply by M. Minus mu. 638 01:21:36.020 --> 01:21:47.860 David Stephens, Prof: So it separates the source of the bias into the 2 parts. Right. And it's easy to see from this that if F is equal to F. 0 or M is equal to mu, then I get 0 639 01:21:48.420 --> 01:21:50.879 David Stephens, Prof: unbiasedness and consistency. 640 01:21:55.880 --> 01:22:02.080 David Stephens, Prof: Yeah, so that's basically what it says that the the 2 miss specifications play a role in the overall misspecification. 641 01:22:03.910 --> 01:22:10.309 David Stephens, Prof: So how do we implement this? Well, we fit the parametric model for the treatment assignment, mechanism. 642 01:22:11.060 --> 01:22:20.659 David Stephens, Prof: logistic regression. Say we fit a an ordinary, least squares model, let's say, or ordinary, least squares analysis for a linear model for M. 643 01:22:21.090 --> 01:22:22.310 David Stephens, Prof: And then we 644 01:22:22.460 --> 01:22:30.010 David Stephens, Prof: combine those 2 models in the 2 State obtained from the 2 stages to get a Plugin version of the estimator 645 01:22:30.980 --> 01:22:31.710 David Stephens, Prof: right? 646 01:22:37.990 --> 01:22:46.629 David Stephens, Prof: And, as I mentioned before, it is sometimes advantageous to estimate the parameters in the treatment of assignment model. Even if we know the values. 647 01:22:47.840 --> 01:22:53.079 David Stephens, Prof: there's a a very special phenomenon that goes on here to do with 648 01:22:53.290 --> 01:23:04.389 David Stephens, Prof: the orthogonality of various parts of the estimating equation, which mean that it's sometimes advantageous to do an adaptation of the model 649 01:23:07.720 --> 01:23:12.100 David Stephens, Prof: to the data rather than plugging in the 650 01:23:12.230 --> 01:23:17.280 David Stephens, Prof: the known value. So we might know the treatment assignment mechanism up to parameter alpha. 651 01:23:19.100 --> 01:23:25.350 David Stephens, Prof: Okay, know what the true value of Alpha is, but it's still better to estimate Alpha from the data and plug that in. 652 01:23:25.560 --> 01:23:28.079 David Stephens, Prof: because that gives a lower variance estimator. 653 01:23:32.960 --> 01:23:37.928 David Stephens, Prof: So the alternative view of augmentation that I'll finish off with before the break is 654 01:23:40.060 --> 01:23:43.740 David Stephens, Prof: gives. An actually rather simpler method 655 01:23:44.030 --> 01:23:51.820 David Stephens, Prof: to constructing the augmented Ipw estimator than the 2 stage approach 656 01:23:52.160 --> 01:24:03.220 David Stephens, Prof: method, and then plugging in to get this estimator here, which is rather a convoluted collection of steps and 657 01:24:04.160 --> 01:24:11.070 David Stephens, Prof: the alternative view comes from realizing that if I'm estimating Mu Z. 658 01:24:11.620 --> 01:24:15.680 David Stephens, Prof: Using that estimator, I'm essentially solving this estimating equation 659 01:24:19.270 --> 01:24:20.030 David Stephens, Prof: right? 660 01:24:20.880 --> 01:24:27.860 David Stephens, Prof: But it turns out that that estimating equation is exactly the same estimating equation that you would get if you did the following thing. 661 01:24:28.460 --> 01:24:36.510 David Stephens, Prof: You did just a an outcome regression model based on M. 0, say 662 01:24:36.780 --> 01:24:40.460 David Stephens, Prof: augmented by a very special kind of term. 663 01:24:46.870 --> 01:24:49.350 David Stephens, Prof: sometimes known as the clever covariate. 664 01:24:49.910 --> 01:24:52.659 David Stephens, Prof: the add-on to the the base model. 665 01:24:53.910 --> 01:24:58.650 David Stephens, Prof: where the additional clever covariate term is essentially based on 666 01:24:59.740 --> 01:25:02.900 David Stephens, Prof: the weight that we see in the estimator. 667 01:25:03.040 --> 01:25:07.870 David Stephens, Prof: Okay, so it's the indicator of the treatment level divided by 668 01:25:08.350 --> 01:25:13.820 David Stephens, Prof: the probability of receiving that treatment with some coefficient Phi that we're going to have to estimate. 669 01:25:15.220 --> 01:25:21.350 David Stephens, Prof: Okay? So if we fit this model using ordinary least squares. 670 01:25:23.870 --> 01:25:32.760 David Stephens, Prof: then it turns out that the predictions from that model are equivalent to the Aipw estimator. 671 01:25:34.030 --> 01:25:40.649 David Stephens, Prof: So this is a 2 stage approach which is actually a bit more simple to implement. We have to estimate the 672 01:25:41.140 --> 01:25:48.700 David Stephens, Prof: treatment assignment model and then estimate the resulting augmented model 673 01:25:50.000 --> 01:25:52.449 David Stephens, Prof: and then average the predictions from that model. 674 01:25:55.860 --> 01:25:58.370 David Stephens, Prof: Okay, so this is 675 01:26:00.248 --> 01:26:08.870 David Stephens, Prof: sometimes, therefore, called augmented outcome regression. We're augmenting an ordinary regression by this very special term. 676 01:26:09.140 --> 01:26:14.860 David Stephens, Prof: That exact is exactly the right term to break the confounding. 677 01:26:16.900 --> 01:26:21.890 David Stephens, Prof: Okay, so this is a somewhat easier method to implement. We'll see that in operation later on this afternoon. 678 01:26:22.710 --> 01:26:32.099 David Stephens, Prof: all right. So we can also go for the average treatment effect directly. 679 01:26:33.610 --> 01:26:41.109 David Stephens, Prof: Okay, so the average tune effect is the difference between these counterfactual atoms. We could get that from the previous model just by taking the difference between 680 01:26:41.340 --> 01:26:53.649 David Stephens, Prof: the estimator of the 1st term and the estimator for the second term. But in the augmentation approach that requires us to estimate a Phi for each Z for each target. Z, so I've got a Phi 0 and a Phi one say. 681 01:26:54.780 --> 01:27:00.289 David Stephens, Prof: okay. And then we can form the estimator of this difference just by taking the difference of the 2 estimators. 682 01:27:00.700 --> 01:27:04.540 David Stephens, Prof: but we can do that more efficiently by 683 01:27:05.430 --> 01:27:08.449 David Stephens, Prof: using a different form of clever covariate. 684 01:27:09.110 --> 01:27:11.040 David Stephens, Prof: which only has a single fly. 685 01:27:11.600 --> 01:27:20.050 David Stephens, Prof: So we do an augmentation. So the original augmentation was based on single terms. 686 01:27:20.700 --> 01:27:24.910 David Stephens, Prof: But now we're thinking about augmenting by 687 01:27:27.400 --> 01:27:35.430 David Stephens, Prof: a single term which is based on the difference in the 2 clever covariate values that I'm going to get under treatment and under no treatment. 688 01:27:35.930 --> 01:27:39.760 David Stephens, Prof: So I could fit this regression model 689 01:27:40.130 --> 01:27:47.769 David Stephens, Prof: estimate Phi single parameter rather than having to estimate. Phi. One and Phi. 0, 2 parameters. 690 01:27:48.430 --> 01:27:55.090 David Stephens, Prof: So if I'm only interested in the average treatment effect and not the average potential outcome for the 2 treatments separately. 691 01:27:55.210 --> 01:27:58.779 David Stephens, Prof: Then I can fit the 1st model and not the second model. 692 01:28:02.450 --> 01:28:03.190 David Stephens, Prof: Okay. 693 01:28:06.850 --> 01:28:11.789 David Stephens, Prof: so that's basically how we use the propensity score or treatment assignment model for 694 01:28:12.600 --> 01:28:16.400 David Stephens, Prof: in a waiting approach, not based on the on the 695 01:28:21.500 --> 01:28:25.110 David Stephens, Prof: on the ordinary regression approach using waiting. 696 01:28:30.800 --> 01:28:39.580 David Stephens, Prof: we've mainly focused on binary treatments up to this point in regression and inverse probability waiting. 697 01:28:41.410 --> 01:28:45.680 David Stephens, Prof: Actually, all of the methods can be extended to think about continuous treatments. 698 01:28:47.750 --> 01:28:52.759 David Stephens, Prof: So the only difference in the continuous treatment case is that instead of modeling the probability 699 01:28:53.510 --> 01:28:56.670 David Stephens, Prof: functions associated between, we model the expectation. 700 01:28:57.920 --> 01:29:04.470 David Stephens, Prof: So we might have a balancing score, which is the conditional expectation given said, rather than the probability 701 01:29:05.320 --> 01:29:13.560 David Stephens, Prof: of treatment given. Sorry. The conditional expectation of treatment given X. Rather than the probability of treatment given. X. 702 01:29:14.000 --> 01:29:14.730 David Stephens, Prof: Right? 703 01:29:16.060 --> 01:29:21.429 David Stephens, Prof: So what do we do with that? Well, it turns out that we do almost exactly the same 704 01:29:23.060 --> 01:29:26.400 David Stephens, Prof: in the regression setting as we did for the binary treatment. 705 01:29:27.670 --> 01:29:29.760 David Stephens, Prof: Gestimation is unaffected. 706 01:29:31.240 --> 01:29:41.319 David Stephens, Prof: Right? We do exactly the same thing. For G estimation. We need correct specification of the treatment part, we have a data generating model, which is some unspecified treatment, free part. 707 01:29:42.910 --> 01:29:46.900 David Stephens, Prof: But we replace that by a propensity score regression term 708 01:29:47.970 --> 01:30:01.910 David Stephens, Prof: the one difference in the so, and things proceed in the same way. We'll see that in a couple of slides the difference in the in the general treatment case rather than the binary case is that we can have other functions of Z, that we think might influence the 709 01:30:02.590 --> 01:30:05.760 David Stephens, Prof: the treatment. Sorry might influence the outcome. 710 01:30:05.970 --> 01:30:10.540 David Stephens, Prof: So, for example, we might have z and z squared, or z 711 01:30:11.100 --> 01:30:15.370 David Stephens, Prof: z squared z times x, 1, z. Squared times x. 1, and so on. 712 01:30:17.610 --> 01:30:36.650 David Stephens, Prof: So what that essentially means is that we need to proceed in the same way as we did previously. But we need to come up with models for those additional components. So, for example, we need the balancing score based on the expectation of Z given X and another balancing score based on the expectation of Z squared, given X, 713 01:30:39.910 --> 01:30:40.620 David Stephens, Prof: okay? 714 01:30:43.010 --> 01:30:55.470 David Stephens, Prof: And then score regression proceeds in the same way as before, except that we use additional correction terms. So at one o'clock now, and that's my plan. Break time. 715 01:30:56.080 --> 01:30:57.920 David Stephens, Prof: so I'll continue with this. 716 01:30:58.090 --> 01:31:05.160 David Stephens, Prof: After the break, we'll look at some implementation details for all of these methods 717 01:31:05.480 --> 01:31:28.790 David Stephens, Prof: in simulated examples, and then in a real example. But before that there's a few just a few things I want to finish off. With respect to continuous treatments. The message overall for continuous treatments is, though, that we do exactly the same thing for continuous treatments as we do for binary treatments. I stressed that yesterday. Really, the adjustment methods are very, very similar. 718 01:31:30.590 --> 01:31:32.389 David Stephens, Prof: Okay, so I'll stop there. 719 01:31:32.839 --> 01:31:39.549 David Stephens, Prof: Just to note that all of the materials are now uploaded to the website. So I'll be referring to some of the other Pdfs 720 01:31:39.980 --> 01:31:47.669 David Stephens, Prof: this afternoon to show examples of all of these methods, so we'll stop there and we'll reconvene 721 01:31:48.065 --> 01:31:52.200 David Stephens, Prof: in half an hour's time. So my time. That would be 1 30 Pm. 722 01:31:53.540 --> 01:31:54.300 David Stephens, Prof: Thanks.