WEBVTT 1 00:00:37.240 --> 00:00:46.999 David Stephens, Prof: Okay. So welcome to the module on propensity scores, I'll start on time. There are people joining as we go on, I guess. But 2 00:00:48.304 --> 00:00:57.140 David Stephens, Prof: we'll get going in a couple of minutes on the real material. So my name is Dave Stevens. I'm professor in department of Mathematics and statistics at Mcgill University, Montreal. 3 00:00:59.330 --> 00:01:04.840 David Stephens, Prof: If you need to contact me, you can contact me at this email address or through the 4 00:01:06.853 --> 00:01:07.700 David Stephens, Prof: Slack channel. 5 00:01:08.410 --> 00:01:16.420 David Stephens, Prof: The recordings for the 2 module. 2 halves of the module today and tomorrow will be posted on the 6 00:01:16.930 --> 00:01:18.790 David Stephens, Prof: on the on the slack channel. 7 00:01:19.330 --> 00:01:22.099 David Stephens, Prof: Hopefully, fairly, promptly, after the close of play. 8 00:01:24.340 --> 00:01:28.074 David Stephens, Prof: The printed materials that you see. So this document, 9 00:01:28.600 --> 00:01:32.585 David Stephens, Prof: can be found on the link that I've also posted in the teams channel. 10 00:01:33.870 --> 00:01:43.189 David Stephens, Prof: the URL is listed here, and the document that we're looking at right now is the one Siscr 2025 11 00:01:43.320 --> 00:01:50.409 David Stephens, Prof: dash Ps, dash mma, dash color. Okay, so this is gonna be the main slides. We'll talk about 12 00:01:51.022 --> 00:01:55.339 David Stephens, Prof: some applications in the other documents. But I'll point those out 13 00:01:55.820 --> 00:01:58.040 David Stephens, Prof: when we get to those points in the module. 14 00:01:58.880 --> 00:02:07.230 David Stephens, Prof: Okay, so this is a module about propensity scores. And we'll basically spend today looking at 15 00:02:08.150 --> 00:02:12.009 David Stephens, Prof: motivations. For why the propensity score is used where it comes up. 16 00:02:12.570 --> 00:02:19.859 David Stephens, Prof: what its justification is, and then start to look at how it's used in statistical operations. 17 00:02:21.420 --> 00:02:28.139 David Stephens, Prof: We'll also spend some time today thinking about general issues around causal inference. 18 00:02:28.380 --> 00:02:35.619 David Stephens, Prof: and I'll give a recap of some of the key ideas, keynotation, and so on. Associated with causal inference generally. 19 00:02:37.524 --> 00:02:40.100 David Stephens, Prof: The causal inference question 20 00:02:40.440 --> 00:02:49.116 David Stephens, Prof: comes about because we often want to make most often want to make causal conclusions from data which otherwise wouldn't 21 00:02:50.090 --> 00:02:56.540 David Stephens, Prof: without causal adjustment be, allow us to make such causal conclusions. 22 00:02:57.310 --> 00:02:59.769 David Stephens, Prof: So the usual 23 00:03:00.080 --> 00:03:10.759 David Stephens, Prof: dichotomy that we make is between experimental studies and observational studies and experimental studies. We have treatment or exposure assigned by the researcher independent of confounding factors. 24 00:03:11.670 --> 00:03:19.750 David Stephens, Prof: And in those cases the the way that we make causal statements about the impact of the treatment is fairly straightforward. We just 25 00:03:20.450 --> 00:03:24.979 David Stephens, Prof: compare the treated group with the non-treated group, and we can 26 00:03:25.120 --> 00:03:31.050 David Stephens, Prof: easily see that the conclusions we make about the treatment effect magnitude 27 00:03:32.190 --> 00:03:38.649 David Stephens, Prof: that we can make from that direct comparison of the 2 groups is a legitimate approach to understanding the 28 00:03:39.710 --> 00:03:43.640 David Stephens, Prof: causal effect of that treatment, whereas in observational studies. 29 00:03:44.540 --> 00:03:51.370 David Stephens, Prof: But the difference in in construction is essentially that the treatment assignment is dependent on confounding factors. 30 00:03:52.120 --> 00:04:12.889 David Stephens, Prof: meaning that, let's say, treated group and untreated group are not comparable in terms of the general characteristics of the individuals concerned. It seems on the surface that causal statements are not possible, and the main reason for that is, that we find it challenging to decouple the effect of treatment from the 31 00:04:13.110 --> 00:04:15.539 David Stephens, Prof: effect of the other confounders. 32 00:04:15.950 --> 00:04:22.979 David Stephens, Prof: So the whole point of the propensity score is to address this issue of making inference from causal inferences from observational data. 33 00:04:25.110 --> 00:04:34.379 David Stephens, Prof: So the module content is basically broke down into these 5 parts. The the bulk of the material is in the is in the 1st 3, 34 00:04:34.620 --> 00:04:41.140 David Stephens, Prof: and then we'll finish off with some extensions at the end. In the in section sessions 4 and 5 35 00:04:41.990 --> 00:04:45.580 David Stephens, Prof: after section 3. We'll be looking at some applied 36 00:04:46.680 --> 00:04:50.880 David Stephens, Prof: versions of analysis with the the tools that we've developed. 37 00:04:52.330 --> 00:04:55.369 David Stephens, Prof: So 1st of all, the need for adjustment. Why. 38 00:04:55.810 --> 00:04:58.710 David Stephens, Prof: confounding is an issue in observational studies? 39 00:05:00.590 --> 00:05:04.120 David Stephens, Prof: Discuss how we can think about getting around that from 40 00:05:05.200 --> 00:05:10.600 David Stephens, Prof: just an empirical analysis of the data, recognize the challenges there. 41 00:05:11.510 --> 00:05:20.600 David Stephens, Prof: And fundamentally, the challenge will be the difficulty of comparison of 2 groups which are fundamentally not comparable. 42 00:05:21.280 --> 00:05:33.370 David Stephens, Prof: So a key issue. There will be the idea of balance, and we'll see a definition of that as we as we get to it. So the second section is about how we manufacture balance, using the propensity score. 43 00:05:34.020 --> 00:05:38.759 David Stephens, Prof: Why, the propensity score is defined the way it is and how it works. 44 00:05:39.500 --> 00:05:46.210 David Stephens, Prof: So then we'll look at statistical tools utilizing the propensity score. So there's a collection of fairly standard statistical 45 00:05:46.990 --> 00:05:55.319 David Stephens, Prof: methodologies that can be deployed with the inclusion of propensity score terms that allow causal inferences to be made. 46 00:05:56.750 --> 00:06:05.769 David Stephens, Prof: then the examples that we'll see will be some simulation examples and analysis of a real data set. And then in sections 4 and 5, 47 00:06:06.160 --> 00:06:07.770 David Stephens, Prof: some extensions. 48 00:06:10.200 --> 00:06:17.099 David Stephens, Prof: So hopefully, we'll get to that point by the end of tomorrow. So the 1st part is broken into these 9 sections. 49 00:06:19.070 --> 00:06:27.959 David Stephens, Prof: background material first, st and then some connections with other related areas and then identifying the fundamental issue of confounding 50 00:06:28.590 --> 00:06:31.239 David Stephens, Prof: and why that causes statistical problems. 51 00:06:32.520 --> 00:06:38.880 David Stephens, Prof: Then we'll introduce the propensity score and see how it's used using this collection of statistical tools. 52 00:06:39.730 --> 00:06:42.880 David Stephens, Prof: Mainly, we'll be looking at the binary treatment case. 53 00:06:44.240 --> 00:06:49.059 David Stephens, Prof: That's the classic case that is used to illustrate the use of the propensity score method. 54 00:06:49.600 --> 00:07:00.170 David Stephens, Prof: but we also see some extensions beyond the binary case, so we might have continuous treatments, and so on, or multi-level treatments and things like that. So we'll see how the propensity score ideas extend to those 55 00:07:00.370 --> 00:07:01.880 David Stephens, Prof: in those directions. 56 00:07:03.250 --> 00:07:10.360 David Stephens, Prof: And then we'll look at the details of how, in a statistical analysis the propensity propensity score can be deployed. 57 00:07:14.970 --> 00:07:20.640 David Stephens, Prof: Then I'll mention a little bit about the key. Statistical ideas. 58 00:07:21.000 --> 00:07:26.389 David Stephens, Prof: implementation ideas, also things such as how we go about 59 00:07:27.110 --> 00:07:34.870 David Stephens, Prof: estimating variances for causal parameters from observational data. 60 00:07:37.900 --> 00:07:43.660 David Stephens, Prof: We'll look at, have a few ideas about the things that we should 61 00:07:43.790 --> 00:07:49.170 David Stephens, Prof: definitely consider when carrying out a statistical analysis, and then look at some examples. 62 00:07:49.670 --> 00:07:58.880 David Stephens, Prof: The the principal extension that I will look at will look be to look at longitudinal data. So most of the module will be given over to looking at 63 00:07:59.000 --> 00:08:01.099 David Stephens, Prof: single time point treatments. 64 00:08:01.420 --> 00:08:02.310 David Stephens, Prof: But 65 00:08:02.840 --> 00:08:17.659 David Stephens, Prof: there are some related methods that will allow us to look at, let's say, courses of treatment interventions planned at a number of successive intervals where we might be interested in a terminal result after the treatment has been completed 66 00:08:18.670 --> 00:08:24.320 David Stephens, Prof: to and pattern has been completed. And there's a particular tool, the marginal structural model that's used in that case. 67 00:08:25.510 --> 00:08:32.160 David Stephens, Prof: And then for the final part, I'll talk about some of the current challenges thinking about, maybe some 68 00:08:32.929 --> 00:08:41.249 David Stephens, Prof: introduction of modern statistical techniques based on machine learning composite methods, ensemble methods and so on. 69 00:08:44.080 --> 00:09:10.951 David Stephens, Prof: Alright. So the 1st part, and then I should say so. You can put messages in the chat. If you, if you have any questions, I'll try to address them as they come up. If there are any sort of more detailed questions that you might have you can still put them in the chat. Maybe I'll address them at the end of the sessions. We'll go for well, do but roughly 50 min section and then have a break, and then continue until 70 00:09:11.790 --> 00:09:18.159 David Stephens, Prof: until well, one pm, my time. So basically, after an hour and a half of the 71 00:09:18.510 --> 00:09:23.129 David Stephens, Prof: of the session, then we'll break for half an hour, and then complete the remaining 72 00:09:24.030 --> 00:09:30.139 David Stephens, Prof: hour and a half for the last session, finishing at 3 Pm. My time, so 1212 pm. On the West Coast. 73 00:09:31.660 --> 00:09:33.080 David Stephens, Prof: All right. So 74 00:09:36.430 --> 00:09:39.299 David Stephens, Prof: the central causal question, then, is to 75 00:09:39.890 --> 00:09:49.600 David Stephens, Prof: identify the effect of a treatment or exposure some measurable recordable 76 00:09:51.010 --> 00:10:00.829 David Stephens, Prof: treatment that is helped or exposure. That's that's meant to alter the condition of the subject. 77 00:10:02.630 --> 00:10:12.239 David Stephens, Prof: So we're looking to quantify the effect of making that change in the exposure or treatment on some measurable outcome. So it could be a health 78 00:10:12.950 --> 00:10:28.699 David Stephens, Prof: outcome. It could be something in economics or econometrics. I've worked in other examples like in transportation, where you make a particular intervention on a on a traffic system. I mean, you want to see the effect of that on various measurable quantities. 79 00:10:29.920 --> 00:10:36.050 David Stephens, Prof: and the challenge is that unless 80 00:10:37.900 --> 00:10:47.790 David Stephens, Prof: the manipulation of the treatment is done independent of other factors, independently 81 00:10:48.210 --> 00:10:51.760 David Stephens, Prof: of so independently of those other factors, then 82 00:10:52.120 --> 00:10:58.299 David Stephens, Prof: it's difficult to tease out what is the effect of the treatment, and what is the effect of those other factors? 83 00:10:58.950 --> 00:11:12.840 David Stephens, Prof: So maybe the maybe, that the inferred effect is subject to the influence of other variables. So this is a problem we meet often in statistics, obviously, and leads us to use tools like regression analysis. 84 00:11:13.681 --> 00:11:22.829 David Stephens, Prof: And we'll see that in the cause and inference setting, actually, similar tools can be deployed. You just have to deploy them in the correct way. 85 00:11:27.170 --> 00:11:35.690 David Stephens, Prof: So my toy example. To illustrate, this is a 2 by 2 table example. So we're looking at the relationship between diet and health status. 86 00:11:35.800 --> 00:11:45.650 David Stephens, Prof: And that's going to be investigated in a a study that requires participants to record 87 00:11:46.340 --> 00:11:52.709 David Stephens, Prof: the quality of their diet, using some measure, and then also the 88 00:11:52.890 --> 00:12:06.859 David Stephens, Prof: health status, or that their health status is being measured. And as a toy example, we're going to look at the exposure being vitamin e content of a diet so normal or low. 89 00:12:07.000 --> 00:12:13.790 David Stephens, Prof: and then an outcome which is incidence of cardiovascular disease in 5 years from the start of the study. 90 00:12:15.290 --> 00:12:21.849 David Stephens, Prof: So that might lead us to data that look like this. So classic, 2 by 2 table example. 91 00:12:22.280 --> 00:12:25.970 David Stephens, Prof: And what we try to uncover is whether that perhaps the rate of 92 00:12:26.090 --> 00:12:31.389 David Stephens, Prof: cardiovascular disease in the normal diet group is different from 93 00:12:32.180 --> 00:12:35.890 David Stephens, Prof: that in the low, low vitamin e diet group. 94 00:12:37.000 --> 00:12:45.980 David Stephens, Prof: So with data like these, there are many standard statistical methods that we could use to compare 2 groups 95 00:12:48.730 --> 00:12:54.790 David Stephens, Prof: test for equality of binomial proportions would be the obvious one. Other other methods could be used. 96 00:12:56.640 --> 00:12:59.110 David Stephens, Prof: and we might be led to some 97 00:13:00.240 --> 00:13:07.789 David Stephens, Prof: immediate conclusion by doing that kind of comparison. Comparing the estimated rate in the 1st group with the estimated rate in the second group. 98 00:13:08.530 --> 00:13:15.199 David Stephens, Prof: and constructing our confidence into a lawyer carrying out a hypothesis test, and that might lead us to a certain conclusion. 99 00:13:16.080 --> 00:13:23.679 David Stephens, Prof: But of course, the real question that we're asking in the background is, if we were to enter, intervene, to change the individual's 100 00:13:23.850 --> 00:13:32.080 David Stephens, Prof: diet, how much would that change the risk of their developing cardiovascular disease? 101 00:13:33.480 --> 00:13:45.799 David Stephens, Prof: So it's not mere merely an observational comparison that we're interested in. We're interested in the underlying causal relationship between the treatment factor or exposure factor 102 00:13:45.900 --> 00:13:47.509 David Stephens, Prof: and the outcome. 103 00:13:48.350 --> 00:13:50.479 David Stephens, Prof: And the key word there is intervene. 104 00:13:51.490 --> 00:13:57.930 David Stephens, Prof: We want to be able to say, Well, what happens if, after observing this, we 105 00:13:58.660 --> 00:14:02.359 David Stephens, Prof: recommend to somebody that they change their diet from one to the other. 106 00:14:04.980 --> 00:14:12.200 David Stephens, Prof: Okay? And of course, in the collected data we have no guarantee that 107 00:14:13.250 --> 00:14:25.999 David Stephens, Prof: the decision to take or to have a particular diet was unaffected by other but potentially influential factors. 108 00:14:26.250 --> 00:14:29.359 David Stephens, Prof: So, for example, it might be that 109 00:14:29.780 --> 00:14:36.990 David Stephens, Prof: socioeconomic status was influencing, influencing both treatment and the outcome. 110 00:14:38.270 --> 00:14:45.860 David Stephens, Prof: So it might be that a direct comparison of the treatment groups 111 00:14:48.520 --> 00:14:51.330 David Stephens, Prof: is compromised by the fact that those groups 112 00:14:51.640 --> 00:14:55.499 David Stephens, Prof: are not fundamentally comparable. They have different characteristics. 113 00:14:56.400 --> 00:15:03.369 David Stephens, Prof: One might be a low socioeconomic status group. The other might be a higher socioeconomic status group. 114 00:15:04.730 --> 00:15:13.449 David Stephens, Prof: and that fundamentally compromises the conclusions that we can genuinely draw from 115 00:15:13.700 --> 00:15:23.130 David Stephens, Prof: the ordinary 2 group comparison. We don't know that the 2 groups are truly comparable. There might be this other factor that is influencing 116 00:15:23.540 --> 00:15:29.380 David Stephens, Prof: the outcome, and the presence of that factor is different in the 2 groups. 117 00:15:30.170 --> 00:15:37.110 David Stephens, Prof: So with that sort of toy example as the as the the starting point. 118 00:15:37.540 --> 00:15:48.580 David Stephens, Prof: I'm going to talk a little bit about mathematical notation and the statistical setup of the problem. So the in the in the analysis that we're going to think about we're going to 119 00:15:48.810 --> 00:15:53.749 David Stephens, Prof: have an outcome which could be binary or integer valued or continuous valued. 120 00:15:54.330 --> 00:15:59.890 David Stephens, Prof: and an exposure which also could be binary or integer valued or continuous valued. 121 00:16:00.380 --> 00:16:08.360 David Stephens, Prof: We'll mainly focus on the continuous outcome and binary treatment case. But we'll see some some other cases 122 00:16:10.220 --> 00:16:23.550 David Stephens, Prof: in the study. We could be thinking about a cross section or single time point analysis that's going to be again the most common thing that we look at in the course. But we'll also think about longitudinal exposure. So multiple time point exposures 123 00:16:24.180 --> 00:16:29.369 David Stephens, Prof: and what we're gonna think about. And I'll talk a bit more about this in the mathematical sense. 124 00:16:30.210 --> 00:16:39.190 David Stephens, Prof: Later on, we're going to consider what happens when we make an intervention to change the exposure status, maybe from 0 to one from untreated to treated. 125 00:16:39.890 --> 00:16:47.020 David Stephens, Prof: And that's going to be representative of a interpretation of a causal impact. 126 00:16:49.130 --> 00:17:04.330 David Stephens, Prof: So the notation that I'm going to use is going to have I indexing individuals. Yi is going to be representing the outcome. Zi is going to be representing the exposure, and Xi is going to be the collection of other variables that are 127 00:17:05.020 --> 00:17:08.550 David Stephens, Prof: collected in the data collection. 128 00:17:09.980 --> 00:17:19.139 David Stephens, Prof: turn them predictors or covariates typically, and we'll also use the term confounders later on. That's gonna have a specific meaning 129 00:17:19.569 --> 00:17:23.119 David Stephens, Prof: in the context of the causal causal analysis 130 00:17:25.160 --> 00:17:29.359 David Stephens, Prof: in the cross-sectional study Y and Z will be scalar valued. 131 00:17:31.910 --> 00:17:40.500 David Stephens, Prof: We might have in longitudinal case that Y is vector valued a vector of outcomes at the individual time. Point ZI might be vector valued. 132 00:17:40.920 --> 00:17:44.500 David Stephens, Prof: Xi is typically vector valued in both cases 133 00:17:47.930 --> 00:17:50.850 David Stephens, Prof: and will represent a collection of variables 134 00:17:51.240 --> 00:17:54.509 David Stephens, Prof: thought relevant at each measurement time point. 135 00:17:56.150 --> 00:18:01.299 David Stephens, Prof: Okay, so that's the notation. Not everybody uses this notation, but it's this 136 00:18:01.410 --> 00:18:05.140 David Stephens, Prof: XY, and Z. But it's the one that I like to stick to. 137 00:18:07.050 --> 00:18:12.729 David Stephens, Prof: And the the fundamental idea of 138 00:18:13.360 --> 00:18:23.789 David Stephens, Prof: that we that we're going to try to get at is this idea of dual influence of those other factors, those other predictors or covariates on both the 139 00:18:24.080 --> 00:18:26.590 David Stephens, Prof: outcome and the treatment. 140 00:18:26.850 --> 00:18:36.169 David Stephens, Prof: And we typically use graphical representations in biostatistics and epidemiology to to understand or represent those 141 00:18:36.640 --> 00:18:50.080 David Stephens, Prof: relationships. So this is the typical so-called, directed acyclic graph or dag for the basic confounding setup that we'll meet late meet throughout the throughout the module. So 142 00:18:50.200 --> 00:18:51.840 David Stephens, Prof: X, the 143 00:18:54.860 --> 00:19:01.349 David Stephens, Prof: predictor or covariate that's collected in this case is a confounder because it influences the 144 00:19:01.860 --> 00:19:04.970 David Stephens, Prof: outcome, and it influences the treatment. 145 00:19:06.510 --> 00:19:13.050 David Stephens, Prof: So that's why those black arrows are there. And the relationship that we're interested in is how 146 00:19:13.240 --> 00:19:15.230 David Stephens, Prof: Z influences. Y, 147 00:19:18.130 --> 00:19:24.840 David Stephens, Prof: okay, so we're interested in studying the relationship between Y and Z. Felt down the arrow here. 148 00:19:25.470 --> 00:19:31.399 David Stephens, Prof: but we recognize that the effect of Z may be moderated. 149 00:19:31.730 --> 00:19:35.149 David Stephens, Prof: modulated, I guess, modulated by the 150 00:19:39.330 --> 00:19:44.899 David Stephens, Prof: possible leakage of the effective, said through X. 151 00:19:45.730 --> 00:19:56.730 David Stephens, Prof: So this kind of graphical representation will be, is very useful in our understanding of the causal problem. 152 00:19:57.030 --> 00:20:15.480 David Stephens, Prof: There was an earlier module. Some of you may have taken on graphical representations where I talked pretty extensively about this. We won't go through those details much in this module, although I included some of the slides as an appendix here. So if you click on that link 153 00:20:15.610 --> 00:20:19.150 David Stephens, Prof: at the bottom there, this link here, you'll be taken to the 154 00:20:19.580 --> 00:20:23.720 David Stephens, Prof: section at the back which talks about probability and graphical representations. 155 00:20:26.420 --> 00:20:35.549 David Stephens, Prof: but I won't delve too much into those details here. Just give a quick summary of the ideas, so to understand cause 156 00:20:36.250 --> 00:20:44.770 David Stephens, Prof: and affect causal relationships in the observational data setting, we're going to use that kind of graph to capture all the key structures. 157 00:20:45.770 --> 00:20:50.299 David Stephens, Prof: So in that deck we can 158 00:20:50.470 --> 00:20:59.499 David Stephens, Prof: recognize that X is a direct cause of y and Z, because there's an arrow going from x into y and into Z 159 00:21:01.500 --> 00:21:06.499 David Stephens, Prof: in that dag Z is a direct cause of Y, 160 00:21:08.700 --> 00:21:19.860 David Stephens, Prof: because there's an arrow from Z into Y, but it's also a so-called mediator of the indirect effect, indirect. It's an indirect cause of z on y, because there is that arrow 161 00:21:20.080 --> 00:21:28.970 David Stephens, Prof: from z passing through x into, or sorry, not arrow path from z through x into y, 162 00:21:32.980 --> 00:21:36.360 David Stephens, Prof: So in that kind of picture there'll be some 163 00:21:36.580 --> 00:21:40.020 David Stephens, Prof: nodes or variables that have no incoming arrows. 164 00:21:40.520 --> 00:21:45.970 David Stephens, Prof: So in our understanding of the corresponding mechanisms. 165 00:21:46.810 --> 00:21:54.250 David Stephens, Prof: Those variables have no other variables that cause them. They're so-called founder variables no inbound arrows. 166 00:21:55.340 --> 00:21:57.969 David Stephens, Prof: And to understand the causal effect 167 00:21:58.220 --> 00:22:15.859 David Stephens, Prof: of a treatment or exposure on an outcome. We're going to think about paths that connect those nodes. So we're going to connect. We consider paths that connect Z to y. If Z is the treatment, and y is the outcome in this dag. Here we have a direct path and an indirect path. 168 00:22:17.100 --> 00:22:20.820 David Stephens, Prof: so we could have 169 00:22:22.430 --> 00:22:31.739 David Stephens, Prof: paths that are directed where all the arrows flow in the same direction, or we could have undirected paths where the arrows don't flow in the same direction. 170 00:22:32.170 --> 00:22:34.389 David Stephens, Prof: Right? So here I can 171 00:22:34.660 --> 00:22:39.690 David Stephens, Prof: see the influence of Z flowing to x, 1 to x, 2 to y. Here 172 00:22:39.840 --> 00:22:52.240 David Stephens, Prof: the influence of Z. Well, there's still a connection between y and Z, representing a particular kind of probability relationship between them, a conditional independence actually given x 1. 173 00:22:52.560 --> 00:22:55.430 David Stephens, Prof: But the arrows don't flow in the same direction. 174 00:22:55.900 --> 00:23:05.319 David Stephens, Prof: Right? So causal effects are gonna flow down directed paths. 175 00:23:06.370 --> 00:23:12.389 David Stephens, Prof: and the problematic paths for understanding causal effects will be the undirected paths. 176 00:23:17.960 --> 00:23:24.690 David Stephens, Prof: Paths connecting 2 variables in the dag will be open 177 00:23:24.880 --> 00:23:30.850 David Stephens, Prof: in general, unless they contain a so-called Collider, where 178 00:23:31.000 --> 00:23:33.869 David Stephens, Prof: we have a node, where we have arrows 179 00:23:34.020 --> 00:23:40.259 David Stephens, Prof: meeting head on at that node. So here we see the arrow going from Z into x, and from y into x. 180 00:23:40.890 --> 00:23:46.570 David Stephens, Prof: and the presence of that collider represents 181 00:23:46.900 --> 00:23:54.060 David Stephens, Prof: a blockage of the path from Z to y, and what we 182 00:23:54.360 --> 00:23:56.769 David Stephens, Prof: take that to mean is that 183 00:23:57.170 --> 00:24:03.870 David Stephens, Prof: the information flow from Z to y is blocked at X, right? So 184 00:24:04.060 --> 00:24:06.680 David Stephens, Prof: if we think about paths from Z to Y. 185 00:24:08.570 --> 00:24:15.530 David Stephens, Prof: Then we can imagine information flowing along this open path here 186 00:24:16.030 --> 00:24:21.649 David Stephens, Prof: all the arrows go in the same direction. So we're going to interpret that as a true causal pathway. 187 00:24:21.970 --> 00:24:29.620 David Stephens, Prof: whereas here the paths, the arrows don't flow in the same direction. So this is an open path, but it's not a causal 188 00:24:30.430 --> 00:24:36.610 David Stephens, Prof: pathway, so our task will be to make sure that 189 00:24:37.810 --> 00:24:41.269 David Stephens, Prof: no information can flow down. Paths like this. Essentially. 190 00:24:41.380 --> 00:24:46.870 David Stephens, Prof: paths like this are all the ones we're interested in. But we have to recognize the presence of these paths 191 00:24:47.360 --> 00:24:50.449 David Stephens, Prof: and do something about them in our statistical analysis. 192 00:24:53.470 --> 00:25:04.399 David Stephens, Prof: So Z to x to Y would be where we have a treatment. So I don't have a graph of that here. But the question is being asked about 193 00:25:07.530 --> 00:25:08.540 David Stephens, Prof: about 194 00:25:10.300 --> 00:25:16.390 David Stephens, Prof: this one question is being asked. Rather a graph that looks. Maybe I'll go back to that. Well, I put it here 195 00:25:16.690 --> 00:25:22.989 David Stephens, Prof: that to X to y. 196 00:25:23.460 --> 00:25:35.409 David Stephens, Prof: And so this is where X is a so-called mediating variable, so the treatment or exposure influences another variable, and the effect of Z is only felt through that variable. 197 00:25:36.190 --> 00:25:39.189 David Stephens, Prof: so the treatment might modify something X, 198 00:25:39.880 --> 00:25:42.970 David Stephens, Prof: and it's that x that modifies y. 199 00:25:44.560 --> 00:25:53.610 David Stephens, Prof: So in this case we can still think of Z as being a cause of y, but it's a sort of downstream path, a downstream. 200 00:25:56.620 --> 00:25:58.149 David Stephens, Prof: a downstream effect. 201 00:25:58.710 --> 00:26:04.460 David Stephens, Prof: So it might be that the treatment lowers blood pressure 202 00:26:05.060 --> 00:26:09.549 David Stephens, Prof: and the blood pressure affects some other health variable? 203 00:26:09.790 --> 00:26:11.090 David Stephens, Prof: Does that make sense. 204 00:26:14.710 --> 00:26:15.789 Nastaran Pourebrahim: Yes, thank you. 205 00:26:18.360 --> 00:26:26.919 David Stephens, Prof: Okay, good. So and so it's the, it's these open paths that we're interested in. We're gonna 206 00:26:27.060 --> 00:26:30.100 David Stephens, Prof: take some action to block these 207 00:26:30.250 --> 00:26:46.420 David Stephens, Prof: open, undirected paths. Now the paths that are closed because of the presence of a collider, because no information flows along those paths, those closed paths, those blocked paths will be not problematic when we come to think about 208 00:26:46.990 --> 00:26:55.309 David Stephens, Prof: causal relationships, and anybody that took the Dag module will see that colliders can cause problems by conditioning 209 00:26:55.860 --> 00:26:57.529 David Stephens, Prof: in certain settings. 210 00:26:58.490 --> 00:26:59.160 David Stephens, Prof: Okay? 211 00:27:00.150 --> 00:27:12.840 David Stephens, Prof: Because conditioning on a collider in an analysis. And we'll we'll talk about what conditioning in an analysis means later on. That opens the otherwise closed path and causes problems in the causal interpretation. 212 00:27:14.330 --> 00:27:15.010 David Stephens, Prof: Okay. 213 00:27:16.290 --> 00:27:30.640 David Stephens, Prof: so yeah, causal effects flow down the open, undirected paths confounding occurs if there are open undirected paths from Z to Y. The key task in a statistical analysis is to block the open, undirected paths, and there are different ways we could do that. 214 00:27:30.970 --> 00:27:35.019 David Stephens, Prof: Usually it's done by some form of 215 00:27:35.170 --> 00:27:47.150 David Stephens, Prof: statistical manipulation, such as stratification or matching or conditioning in a regression model. We'll we'll see the details of this, as we go through the course 216 00:27:51.370 --> 00:27:53.250 David Stephens, Prof: there are other issues to do is 217 00:27:53.990 --> 00:28:00.660 David Stephens, Prof: the statistical specification of these models which we'll also talk about. But the but the basic idea is that 218 00:28:00.880 --> 00:28:06.989 David Stephens, Prof: we're going to set up the causal problem such that if we condition in exactly the right way 219 00:28:07.210 --> 00:28:12.990 David Stephens, Prof: that will facilitate causal conclusions from observational data 220 00:28:21.240 --> 00:28:26.400 David Stephens, Prof: to sort of modify sorry, modify to, to motivate the 221 00:28:26.820 --> 00:28:34.099 David Stephens, Prof: some of the regression modeling we're going to do. I think it's useful to think about cause and effect in a mathematical fashion. 222 00:28:34.980 --> 00:28:38.789 David Stephens, Prof: and to to think about how we can interpret the analyses 223 00:28:39.570 --> 00:28:46.839 David Stephens, Prof: that we carry out in the statistical way in terms of the corresponding graphical representation. 224 00:28:47.120 --> 00:28:50.280 David Stephens, Prof: So this leads us to what we call structural modeling 225 00:28:50.760 --> 00:29:03.850 David Stephens, Prof: and structural occasions, structural relationships. So the idea of a structural model is that we capture the relationship between the variables through definitions such as this. So let's say, I'm going to generate 226 00:29:05.520 --> 00:29:10.310 David Stephens, Prof: the random, variable Z, the treatment variable by taking some function 227 00:29:10.420 --> 00:29:13.710 David Stephens, Prof: of X and some random error. 228 00:29:14.340 --> 00:29:22.960 David Stephens, Prof: So in this formula X is a random, variable. Remember, in my confounding dag, it's a founder variable, so it has no variables that cause it right? 229 00:29:24.600 --> 00:29:26.679 David Stephens, Prof: So X is generated. 230 00:29:26.840 --> 00:29:31.380 David Stephens, Prof: But then, once we've got X, we use the 1st formula here to generate z. 231 00:29:32.340 --> 00:29:41.640 David Stephens, Prof: and the second formula in the same way to generate y, so the 1st function takes only x, and this random perturbation to give Z. 232 00:29:42.470 --> 00:29:45.269 David Stephens, Prof: The second equation takes both X and Z, 233 00:29:45.700 --> 00:29:52.480 David Stephens, Prof: and that another random perturbation maps them through for a similar function. G, 234 00:29:52.740 --> 00:29:59.550 David Stephens, Prof: GY. To produce y. So these 2 equations are meant to capture 235 00:30:01.030 --> 00:30:09.670 David Stephens, Prof: the relationships that are that are graphically represented graphically represented through this dag. 236 00:30:09.900 --> 00:30:14.889 David Stephens, Prof: Right? So basically, we're putting some details onto what this arrow means 237 00:30:15.070 --> 00:30:21.540 David Stephens, Prof: right. So this arrow means we take X, we map it through some function, and we get Y 238 00:30:22.840 --> 00:30:32.570 David Stephens, Prof: with the presence of, because this formula involves an arrow going into y from Z as well. That means we take these 2 arrows together 239 00:30:33.090 --> 00:30:36.049 David Stephens, Prof: and represent them in the second equation. 240 00:30:36.190 --> 00:30:42.800 David Stephens, Prof: whereas here we see just an arrow going from X into Z, and this represents the fact that we're going to take X 241 00:30:43.160 --> 00:31:05.429 David Stephens, Prof: and generate Z from it. So I include in my structural relationships. Here the presence of these other perturbation variables think thought about themselves as individual founders, because typically in statistical regression models, we have the idea of residual variation. So these are just like the residuals in a regression type analysis. I'll 242 00:31:06.010 --> 00:31:08.870 David Stephens, Prof: pull up some examples of this in a second, to give the idea. 243 00:31:10.960 --> 00:31:14.640 David Stephens, Prof: So again, we take X and epsilon z 244 00:31:15.310 --> 00:31:18.689 David Stephens, Prof: combine them through the function G to obtain the treatment. 245 00:31:19.400 --> 00:31:31.510 David Stephens, Prof: and we then combine X and Z with epsilon y through the function gy to obtain y, so our mathematical representation of cause and effect can be understood through these equations. 246 00:31:33.020 --> 00:31:34.260 David Stephens, Prof: That's the idea. 247 00:31:34.970 --> 00:31:44.860 David Stephens, Prof: So, for example, we might have that we think that Z is generated by taking x and adding a random perturbation, epsilon z. 248 00:31:45.220 --> 00:31:52.760 David Stephens, Prof: and we think that y is generated by taking twice x and adding 5 z, and then adding 3 XZ. 249 00:31:53.020 --> 00:31:56.829 David Stephens, Prof: And then the other residual right. So we 250 00:31:56.960 --> 00:32:00.810 David Stephens, Prof: to put some bone to meet on the bones of the of the dag. 251 00:32:00.980 --> 00:32:03.889 David Stephens, Prof: We think about these equations. So with the arrow 252 00:32:05.320 --> 00:32:14.550 David Stephens, Prof: from X to Z is captured through this relationship, and the arrow, the arrows going into Y from X and Z is captured through this relationship. 253 00:32:15.270 --> 00:32:19.059 David Stephens, Prof: So the the statistical view of causation 254 00:32:20.700 --> 00:32:27.639 David Stephens, Prof: well, the most common view of statistical causation is encapsulated in equations like this. 255 00:32:29.490 --> 00:32:37.980 David Stephens, Prof: So I mentioned that so that I can talk about what a causal effect is, but also to point out that these look a lot like regression models. 256 00:32:38.170 --> 00:32:43.329 David Stephens, Prof: right? And if we wanted to learn about the effect of Z on y. 257 00:32:44.200 --> 00:32:57.429 David Stephens, Prof: let's say we would maybe fit the second regression model right? And it turns out that that approach the regression approach for causal inference is actually a perfectly perfectly good way of making causal inferences. 258 00:32:58.200 --> 00:32:58.610 David Stephens, Prof: Okay. 259 00:32:59.390 --> 00:33:09.529 David Stephens, Prof: But what we also know from regression analysis is that if we get this model wrong in the second equation here and fit the wrong regression model, we will get wrong conclusions. 260 00:33:10.810 --> 00:33:17.880 David Stephens, Prof: So at least part of the propensity score story is to help us introduce 261 00:33:18.540 --> 00:33:26.719 David Stephens, Prof: robustness into that regression model specification to allow causal inference for the effect of treatment. 262 00:33:27.330 --> 00:33:31.520 David Stephens, Prof: even if we don't have correct specification of the regression model. 263 00:33:32.730 --> 00:33:33.440 David Stephens, Prof: Right? 264 00:33:33.670 --> 00:33:35.960 David Stephens, Prof: So these are the structural equations. 265 00:33:36.340 --> 00:33:41.959 David Stephens, Prof: and we literally read them from right to left. We say that well, we get Z by 266 00:33:42.190 --> 00:33:44.870 David Stephens, Prof: forming this random variable, and 267 00:33:45.130 --> 00:33:55.810 David Stephens, Prof: adding these 2 together and getting Z, and to form y, we take the formula on the right hand side. Take all of those variables and combine them together to get y 268 00:33:56.990 --> 00:34:07.010 David Stephens, Prof: right all right. So in that frame framework. 269 00:34:08.080 --> 00:34:15.880 David Stephens, Prof: If we think about understanding the unconfounded effect of Z on y, what that means is 270 00:34:16.000 --> 00:34:18.610 David Stephens, Prof: we want to understand what happens when 271 00:34:21.790 --> 00:34:26.619 David Stephens, Prof: we regard Z as a variable that we can manipulate in its own right. 272 00:34:27.860 --> 00:34:33.889 David Stephens, Prof: So in the original confounding dag, we saw that 273 00:34:34.460 --> 00:34:41.420 David Stephens, Prof: X was a cause of Z, that is, X appeared in the formula that set Z's value. 274 00:34:43.230 --> 00:34:45.730 David Stephens, Prof: and that might be very 275 00:34:45.840 --> 00:35:01.409 David Stephens, Prof: representative of the data collection mechanism that we've gone through in our observational study. We recognize that when we collect data on individuals they have individual characteristics, and those characteristics will determine their exposure or treatment. 276 00:35:01.570 --> 00:35:02.320 David Stephens, Prof: Perhaps. 277 00:35:02.650 --> 00:35:08.270 David Stephens, Prof: Okay. But our our job is to understand the causal effect of Z. 278 00:35:08.690 --> 00:35:10.970 David Stephens, Prof: That is what happens when we 279 00:35:11.450 --> 00:35:19.950 David Stephens, Prof: manipulate Z on its own, and do not regard X as a cause of Z, right? So instead of 280 00:35:20.090 --> 00:35:25.100 David Stephens, Prof: x changing Z's value, we, as the researcher are going to change it. 281 00:35:25.830 --> 00:35:31.260 David Stephens, Prof: Okay? So if we remove so and again to think about causal effects. 282 00:35:31.510 --> 00:35:43.170 David Stephens, Prof: Think about interventions to change a treatment level value. What that essentially means is that we remove the previous arrow that goes from X into Z. We make ZA founder. 283 00:35:43.390 --> 00:35:47.360 David Stephens, Prof: We think about manipulating Zed separately from everything else. 284 00:35:48.540 --> 00:35:52.689 David Stephens, Prof: That's the only thing that changes in the dag. So this is a dag with. Now no confounding. 285 00:35:54.170 --> 00:35:57.370 David Stephens, Prof: Okay. X is a confounder. If 286 00:35:57.650 --> 00:36:00.150 David Stephens, Prof: there's an arrow going from X into Y, 287 00:36:00.560 --> 00:36:02.810 David Stephens, Prof: and an arrow going from X into Z, 288 00:36:03.840 --> 00:36:08.999 David Stephens, Prof: or equivalently with some paths that do that not necessarily direct arrows. 289 00:36:09.330 --> 00:36:17.099 David Stephens, Prof: So here we have no confounding, because X has an influence on Y, but it doesn't have an influence on Z. 290 00:36:17.740 --> 00:36:23.580 David Stephens, Prof: So for observational studies, we can't be guaranteed that this Dag pertains 291 00:36:24.250 --> 00:36:31.100 David Stephens, Prof: right. But in the case of experimental studies, where the researcher manipulates the treatment. 292 00:36:31.490 --> 00:36:38.220 David Stephens, Prof: This is exactly the Dac that we might be interested in representing the experimental study using. 293 00:36:38.750 --> 00:36:39.470 David Stephens, Prof: Okay? 294 00:36:40.960 --> 00:36:52.410 David Stephens, Prof: So now we see, we see why this sort of graphical and pathway path analysis, kind of structure is useful because we see now that 295 00:36:52.690 --> 00:37:00.169 David Stephens, Prof: there is a single path from Z to Y, so we can understand exactly the effect of Z and y by analyzing that path. 296 00:37:00.380 --> 00:37:06.759 David Stephens, Prof: There is no other path. There is no possibility of leakage of the Z effect through X, for example. 297 00:37:08.280 --> 00:37:08.970 David Stephens, Prof: right? 298 00:37:09.170 --> 00:37:14.429 David Stephens, Prof: So this is the kind of dag that we're interested in. It's the kind of dag we get in experimental studies. 299 00:37:16.020 --> 00:37:25.980 David Stephens, Prof: What does that correspond to in the structural equation. Well, it basically means that we set Z to a specific value. Little Red Z, that's going to be my notation. So it's a sans serif z as well. 300 00:37:26.941 --> 00:37:41.799 David Stephens, Prof: Meaning to say that. Okay, well, the the structural relationship between Yx and Z is still the same right? It's still captured by the second equation, the Gy equation. It's just that. Now I'm choosing the value of Z, 301 00:37:42.350 --> 00:37:44.769 David Stephens, Prof: and I'm choosing it to be this specific value. 302 00:37:46.100 --> 00:37:48.940 David Stephens, Prof: So I still take what's on the right hand side here. 303 00:37:49.330 --> 00:37:51.480 David Stephens, Prof: Combine them together to get y. 304 00:37:54.670 --> 00:37:59.160 David Stephens, Prof: The difference is that Z is no longer a random, variable. It's the. 305 00:37:59.270 --> 00:38:04.559 David Stephens, Prof: It's a specific value. Well, it's a random variable, that's degenerate at a particular value. I guess 306 00:38:05.230 --> 00:38:08.960 David Stephens, Prof: right takes the value. Little Red Z, with probability. One. 307 00:38:10.800 --> 00:38:11.480 David Stephens, Prof: Okay. 308 00:38:11.950 --> 00:38:14.399 David Stephens, Prof: So the change from this equation 309 00:38:15.330 --> 00:38:20.819 David Stephens, Prof: to this equation is key to understanding the setup of causal inference. 310 00:38:22.720 --> 00:38:31.450 David Stephens, Prof: because we want to understand cause and effect through this kind of structural equation, where I change the value of Z, 311 00:38:31.830 --> 00:38:34.719 David Stephens, Prof: maybe from one little red Z value to another. 312 00:38:35.540 --> 00:38:39.260 David Stephens, Prof: Okay? Because then we're manipulating Z on its own 313 00:38:40.240 --> 00:38:43.460 David Stephens, Prof: without the effect of X being relevant. 314 00:38:44.470 --> 00:38:48.509 David Stephens, Prof: Okay, so X is relevant in setting the value of Y for sure, right? 315 00:38:49.610 --> 00:38:52.430 David Stephens, Prof: It's just not relevant in setting the value of Z 316 00:38:54.480 --> 00:39:02.529 David Stephens, Prof: alright. So typical notation that we use to capture that idea is the counterfactual or potential outcomes notation. 317 00:39:02.700 --> 00:39:18.609 David Stephens, Prof: So the notation that we use is this, Yi Z is the hypothetical outcome for individual life. We need to intervene to set the exposure to Z. So basically, it's the thing that appears on the right hand side of this equation. So this is now in my new notation. This is going to be y 318 00:39:18.760 --> 00:39:21.250 David Stephens, Prof: zed. I mean, everything's red in my 319 00:39:21.530 --> 00:39:26.319 David Stephens, Prof: writing there. But actually, it's only the little red that said, that's inside that should be in red 320 00:39:27.800 --> 00:39:28.650 David Stephens, Prof: anyway. 321 00:39:31.180 --> 00:39:39.179 David Stephens, Prof: so this is the hypothetical outcome. It's a random, variable for individual eye. If we were to intervene to set the exposure to this little Red Z value. 322 00:39:40.130 --> 00:39:43.939 David Stephens, Prof: sometimes it's called counterfactual. Sometimes it's called a potential outcome. 323 00:39:45.060 --> 00:39:45.750 David Stephens, Prof: Okay? 324 00:39:46.390 --> 00:39:54.189 David Stephens, Prof: And if the exposure is binary, therefore, so Z takes a value 0 and one, then we have a pair of potential outcomes. 325 00:39:55.490 --> 00:40:03.569 David Stephens, Prof: Why, if we had no treatment or treatment to level 0, and why, if 326 00:40:04.220 --> 00:40:06.659 David Stephens, Prof: there was treatment or treatment at level one. 327 00:40:07.250 --> 00:40:10.599 David Stephens, Prof: so those would be the 2 hypothetical outcomes 328 00:40:12.720 --> 00:40:18.199 David Stephens, Prof: that would result if I manipulated this equation by 1st setting Z equal to 0 329 00:40:18.460 --> 00:40:20.599 David Stephens, Prof: and then setting Z equal to one. 330 00:40:21.390 --> 00:40:26.319 David Stephens, Prof: Okay, now, we notice in this that x does still help to set the value of y. 331 00:40:29.710 --> 00:40:34.339 David Stephens, Prof: but remember, X is no longer setting the value of Z, we're setting the value of Z. 332 00:40:36.300 --> 00:40:42.529 David Stephens, Prof: So those those that pair of potential outcomes are going to allow us to talk about the causal effect of 333 00:40:42.840 --> 00:40:45.640 David Stephens, Prof: making that manipulation from one to 0. 334 00:40:46.660 --> 00:40:54.189 David Stephens, Prof: We can write the observed outcome, using all the random variables that we've defined so far. One simple way to do it is this. 335 00:40:55.030 --> 00:40:59.370 David Stephens, Prof: it says, well, the observed value of y is 336 00:41:00.250 --> 00:41:04.609 David Stephens, Prof: the potential outcome for no treatment. If, in fact, there was no treatment. 337 00:41:05.130 --> 00:41:08.430 David Stephens, Prof: or it's the potential outcome for one. 338 00:41:08.570 --> 00:41:11.230 David Stephens, Prof: the treatment. If, in fact, there was treatment. 339 00:41:11.510 --> 00:41:17.470 David Stephens, Prof: So if z is 0, that indicates the actual received treatment 340 00:41:19.720 --> 00:41:24.909 David Stephens, Prof: was 0 or no treatment case, in which case we get y 0, 341 00:41:25.270 --> 00:41:29.629 David Stephens, Prof: whereas if Z was equal to one representing the 342 00:41:30.640 --> 00:41:34.140 David Stephens, Prof: treated case, then we get y 1. 343 00:41:35.760 --> 00:41:41.280 David Stephens, Prof: Okay, so that allows us to frame the observed, outcome 344 00:41:41.450 --> 00:41:46.250 David Stephens, Prof: in terms of the observed treatment and the potential outcomes. 345 00:41:47.390 --> 00:41:48.230 David Stephens, Prof: All right. 346 00:41:50.870 --> 00:41:53.500 David Stephens, Prof: Oh, I think it's useful to see that on a dag 347 00:41:53.760 --> 00:42:01.019 David Stephens, Prof: you don't see this dag in many, many textbooks, but this is the dag I like to use, because it reinforces the fact that 348 00:42:02.500 --> 00:42:03.190 David Stephens, Prof: and. 349 00:42:03.190 --> 00:42:06.009 peter wambi: Again how you got one minus z. 350 00:42:06.010 --> 00:42:18.899 David Stephens, Prof: Yeah, so so z is binary. Right in this case, this simple case. So if z is so z being 0 means that I get that, that I have no treatment. 351 00:42:19.680 --> 00:42:23.049 David Stephens, Prof: So one minus Z in that case, is just the value one. 352 00:42:23.960 --> 00:42:29.529 David Stephens, Prof: So YI, in that case, is one times, y. Bracket 0. 353 00:42:29.860 --> 00:42:36.339 David Stephens, Prof: So that returns for me the potential outcome under no treatment. 354 00:42:37.230 --> 00:42:44.100 David Stephens, Prof: whereas if Z is equal to 1 1 minus z is equal to 0. So this term disappears, and I only get the second term. 355 00:42:45.670 --> 00:42:46.899 David Stephens, Prof: Does that make sense. 356 00:42:48.880 --> 00:42:50.269 peter wambi: It does. Thank you. 357 00:42:51.550 --> 00:42:52.030 David Stephens, Prof: Good. 358 00:42:53.077 --> 00:43:01.999 David Stephens, Prof: It's a good question, though, because we're going to be seeing more complicated versions of this formula in a second. When we think about multiple treatments, multiple level treatments. 359 00:43:02.190 --> 00:43:02.930 David Stephens, Prof: anyway. 360 00:43:03.340 --> 00:43:09.690 David Stephens, Prof: Yes. So I think it's useful to see the to see that dag. 361 00:43:10.000 --> 00:43:21.060 David Stephens, Prof: For that case it really emphasizes that X causes the 2 potential outcomes. 362 00:43:21.300 --> 00:43:25.840 David Stephens, Prof: and that relationship is captured by this formula. 363 00:43:26.620 --> 00:43:30.920 David Stephens, Prof: Right? So it says that, well, Z is a constant set by me. 364 00:43:31.170 --> 00:43:35.670 David Stephens, Prof: So the only thing that causes the potential outcome is X 365 00:43:35.850 --> 00:43:40.360 David Stephens, Prof: and the perturbation. But I don't draw the perturbations on the new dag. 366 00:43:41.460 --> 00:43:45.980 David Stephens, Prof: So it says that X causes the potential outcomes. 367 00:43:46.190 --> 00:43:59.369 David Stephens, Prof: And also in the confounding dag we have X causing Z, but the potential outcomes 368 00:43:59.810 --> 00:44:05.459 David Stephens, Prof: and Z get together to cause Y, that's what this equation says 369 00:44:07.150 --> 00:44:13.899 David Stephens, Prof: so. I think it's useful to draw this dag to illustrate the key assumptions. 370 00:44:14.520 --> 00:44:18.859 David Stephens, Prof: And what it means is really, is that x. 371 00:44:19.890 --> 00:44:23.730 David Stephens, Prof: So X are the general characteristics of the people in the study. 372 00:44:24.970 --> 00:44:28.299 David Stephens, Prof: And what this says is that even before we see treatment. 373 00:44:30.020 --> 00:44:38.340 David Stephens, Prof: the possible values of the outcome, that we could have are predetermined by acts. 374 00:44:40.180 --> 00:44:46.059 David Stephens, Prof: Okay? And we only get to see 375 00:44:47.160 --> 00:44:53.080 David Stephens, Prof: which outcome we have when we know what the treatment is in the observational data. 376 00:44:55.260 --> 00:45:00.109 David Stephens, Prof: So the characteristics lay out the potential things that could happen. 377 00:45:00.470 --> 00:45:05.300 David Stephens, Prof: And then the actual observed treatment tells us which one of those we do get. 378 00:45:07.230 --> 00:45:07.910 David Stephens, Prof: Okay. 379 00:45:10.470 --> 00:45:21.389 David Stephens, Prof: the other thing that's important here, which we'll come back to through the Statistical model section. It says, if we know the value of X, then we know the distribution of both these things, and we don't need to know anything about the actual treatment. 380 00:45:22.930 --> 00:45:25.360 David Stephens, Prof: because the arrow here 381 00:45:27.760 --> 00:45:33.609 David Stephens, Prof: is the only arrow going into the potential outcomes. Right? We don't need to know the treatment. 382 00:45:34.030 --> 00:45:38.750 David Stephens, Prof: the observed treatment to think about those potential outcomes. 383 00:45:41.720 --> 00:45:42.580 David Stephens, Prof: All right. 384 00:45:43.280 --> 00:45:54.160 David Stephens, Prof: So yeah, if the exposure is multi-valued. Then we get a collection of these potential outcomes. So z, 1, z, 2, are the potential levels of treatment or sorry the possible levels of treatment 385 00:45:54.370 --> 00:46:05.690 David Stephens, Prof: and the Y, corresponding to each of those is the outcome that we would get in the eventuality that the treatment was set equal to z. 1 or z 2, 386 00:46:05.960 --> 00:46:16.739 David Stephens, Prof: or said d and for the observed version of y, then 387 00:46:17.380 --> 00:46:23.309 David Stephens, Prof: well, it's again the observed treatment that we get which determines that. 388 00:46:23.890 --> 00:46:39.479 David Stephens, Prof: So let's say so again. z, 1, z, 2 dot down to zd, those are the possible values of treatment. Then we observe what the actual treatment was observed was, so we pick off one of those. And then that determines what outcome we get. 389 00:46:40.060 --> 00:46:47.900 David Stephens, Prof: Right? So it's a generalization of the previous dag. But instead of having 2 potential outcomes. We've got this collection of D potential outcomes. 390 00:46:49.710 --> 00:46:53.060 David Stephens, Prof: And the formula used to represent, that is this 391 00:46:53.450 --> 00:46:57.799 David Stephens, Prof: right? So again, this indicator variable picks off 392 00:46:58.190 --> 00:47:04.599 David Stephens, Prof: which of the possible observed treatments we actually got in the study. 393 00:47:04.900 --> 00:47:10.130 David Stephens, Prof: and then we obtained the outcome corresponding to that from the list of potential outcomes. 394 00:47:11.540 --> 00:47:15.520 David Stephens, Prof: But that's so, that's an indicator function. And we'll use this throughout the 395 00:47:16.430 --> 00:47:22.424 David Stephens, Prof: module for the different purposes. But I just so I introduced that notation here. This indicator variable means that 396 00:47:22.980 --> 00:47:29.680 David Stephens, Prof: it's a it's a it's a function that takes the value one. If the argument and the thing in the brackets here match 397 00:47:30.030 --> 00:47:35.200 David Stephens, Prof: and takes the value 0 otherwise. So it's just a convenient way of saying that 398 00:47:36.000 --> 00:47:37.890 David Stephens, Prof: relationship between the 2 things. 399 00:47:39.800 --> 00:47:42.159 David Stephens, Prof: Alright. It's not too critical to understand 400 00:47:42.660 --> 00:47:48.809 David Stephens, Prof: all the details here, but it's I like to include it because it sets up sets up the general framework. 401 00:47:50.289 --> 00:47:55.879 David Stephens, Prof: We could also have pretend sorry we could have possible treatments on a continuous 402 00:47:56.430 --> 00:48:03.639 David Stephens, Prof: range, in which case we get a family of potential outcomes. So let's say, we could have a dose anywhere between 0 and 10 403 00:48:04.290 --> 00:48:07.830 David Stephens, Prof: on the real line. Then we would get 404 00:48:08.170 --> 00:48:12.000 David Stephens, Prof: a corresponding potential outcome for each of those. 405 00:48:12.680 --> 00:48:23.800 David Stephens, Prof: And then again, the actual outcome would be the potential outcome corresponding to the observed treatment level. 406 00:48:27.580 --> 00:48:29.689 David Stephens, Prof: So that's the setup of the notation. 407 00:48:31.390 --> 00:48:39.720 David Stephens, Prof: Typically, of course, we don't get to observe all of the potential outcomes, because in most 408 00:48:39.910 --> 00:48:45.670 David Stephens, Prof: studies, we just get to observe one version of the treatment 409 00:48:47.020 --> 00:49:02.850 David Stephens, Prof: in observational studies. We might record somebody's treatment level as yes, they took the drugs or whatever or no, they didn't take the drugs, and we only get to observe their outcome corresponding to that treatment, their their received treatment. 410 00:49:03.530 --> 00:49:06.710 David Stephens, Prof: So we can't observe these 2 things simultaneously. 411 00:49:06.880 --> 00:49:10.130 David Stephens, Prof: So you might wonder, then, well, why did you bother introducing them? 412 00:49:10.590 --> 00:49:23.550 David Stephens, Prof: Because they're not going to be useful in statistical analysis? Well, that's true, but they are useful in framing the causal problem and giving us a concrete interpretation of what a causal effect is. 413 00:49:25.960 --> 00:49:30.138 David Stephens, Prof: So in the previous example. Here say, for example, we did. Look 414 00:49:30.590 --> 00:49:41.119 David Stephens, Prof: cardiovascular disease and diet. We can't simultaneously observe their cardiovascular disease status under both diet conditions. 415 00:49:41.700 --> 00:49:45.540 David Stephens, Prof: We only get to observe on whatever diet they took, we get the corresponding 416 00:49:45.680 --> 00:49:48.630 David Stephens, Prof: outcome potential outcome for that as the observed outcome. 417 00:49:49.490 --> 00:49:58.329 David Stephens, Prof: So really, this is this lack of full information is the 1st fundamental challenge of causal inference. Our job will be to really to compare 418 00:49:58.720 --> 00:50:02.510 David Stephens, Prof: outcomes under treatment with outcomes under no treatment. 419 00:50:03.360 --> 00:50:07.780 David Stephens, Prof: But the problem is, we don't get to observe both of those on any individual. 420 00:50:08.400 --> 00:50:15.009 David Stephens, Prof: Typically, there are some study designs, crossover designs that would allow that. But in general it's not possible to do that 421 00:50:16.320 --> 00:50:25.619 David Stephens, Prof: right. So we need to find a way to do that. What is essentially a 2 group comparison, recognizing the fact that we're gonna not have pairs of data on 422 00:50:26.150 --> 00:50:27.390 David Stephens, Prof: each individual. 423 00:50:33.740 --> 00:50:41.740 David Stephens, Prof: So our task, when thinking about causal inference will be to define or think about causal estimates. 424 00:50:42.290 --> 00:50:46.030 David Stephens, Prof: So what causal effect are we interested in? 425 00:50:47.870 --> 00:50:52.829 David Stephens, Prof: So we've framed it in the sense of, you know, looking at differences in outcome between 426 00:50:53.030 --> 00:50:56.650 David Stephens, Prof: different treatment levels where we manipulate treatment. 427 00:51:01.720 --> 00:51:06.540 David Stephens, Prof: We've phrased that now, through the counterfactual or potential outcome notation. 428 00:51:07.260 --> 00:51:17.710 David Stephens, Prof: and in that notation we can say that well, the causal effect of exposure is going to be determined in some way by looking at differences in potential outcomes 429 00:51:17.910 --> 00:51:20.329 David Stephens, Prof: corresponding to different exposure levels. 430 00:51:24.240 --> 00:51:32.350 David Stephens, Prof: So our setup has enabled us to at least talk about causal effects in a concrete way. 431 00:51:35.900 --> 00:51:42.380 David Stephens, Prof: Okay, and we'll spend a lot of time thinking about those exact ideas, some immediate ideas coming up. 432 00:51:42.680 --> 00:51:48.169 David Stephens, Prof: But I have to acknowledge, I guess, that this is a statistical rather than mechanistic. 433 00:51:48.650 --> 00:51:51.840 David Stephens, Prof: or indeed philosophical view of causation. 434 00:51:52.600 --> 00:51:53.390 David Stephens, Prof: Right? 435 00:51:54.260 --> 00:51:56.730 David Stephens, Prof: We wrote down some equations 436 00:51:56.980 --> 00:52:07.009 David Stephens, Prof: and said, Well, the causal effect is going to be interpreted in terms of those equations in the following way. So I guess if you're not a statistician or mathematician, you might 437 00:52:07.830 --> 00:52:11.190 David Stephens, Prof: want to delve deeper into the idea of cause and effect. 438 00:52:13.550 --> 00:52:15.540 David Stephens, Prof: But we're not going to do that in this course. 439 00:52:18.980 --> 00:52:25.135 David Stephens, Prof: So for binary variables, binary exposures. 440 00:52:27.530 --> 00:52:35.030 David Stephens, Prof: we're going to think about the causal effect by looking at simple contrasts between potential outcomes. 441 00:52:35.620 --> 00:52:42.599 David Stephens, Prof: And again, I'll reiterate that we're not yet here talking about data. 442 00:52:43.110 --> 00:52:46.409 David Stephens, Prof: right? We'll see how data play into this 443 00:52:47.780 --> 00:52:52.540 David Stephens, Prof: shortly. We're here here still trying to frame the causal problem. 444 00:52:53.280 --> 00:52:54.300 David Stephens, Prof: So 445 00:52:55.220 --> 00:53:08.789 David Stephens, Prof: we might think about the effect of treatment by looking at a contrast on that on an additive scale. So that is the effect on individual eye of changing from treatment 0 to treatment. One is measured by this difference. 446 00:53:09.710 --> 00:53:15.699 David Stephens, Prof: So this is a random, variable. It's a random difference. Looking at the difference between these 2 potential outcomes. 447 00:53:16.680 --> 00:53:19.639 David Stephens, Prof: we might have multiplicative contrast. Look at a ratio 448 00:53:20.690 --> 00:53:27.259 David Stephens, Prof: for continuous exposures. We might think about tracing the potential outcome. 449 00:53:27.971 --> 00:53:31.340 David Stephens, Prof: Z changes across its continuous range. 450 00:53:32.770 --> 00:53:36.379 David Stephens, Prof: and that allow us to look at causal dose response. 451 00:53:38.980 --> 00:53:47.929 David Stephens, Prof: So the causal effects themselves are well defined at the individual level. 452 00:53:48.190 --> 00:53:56.710 David Stephens, Prof: But also we're recognizing that we're recognizing that often 453 00:53:57.090 --> 00:54:05.449 David Stephens, Prof: we're not. We're not primarily interested in individual level effects because we recognize that individual level effects are 454 00:54:05.800 --> 00:54:11.850 David Stephens, Prof: influenced somewhat by individual characteristics. 455 00:54:12.730 --> 00:54:21.150 David Stephens, Prof: So although at the at the individual level. This is a genuine causal effect of treat, of treatment changing from 0 to one. 456 00:54:22.170 --> 00:54:28.640 David Stephens, Prof: The eye Index recognizes that that effect is going to be local to that individual. 457 00:54:30.030 --> 00:54:37.360 David Stephens, Prof: So, perhaps more usefully, we should think about average 458 00:54:38.460 --> 00:54:42.800 David Stephens, Prof: causal effects, average potential outcomes across the population. 459 00:54:44.300 --> 00:54:52.789 David Stephens, Prof: So in general, we're going to look at population, causal effects based on expected or average potential outcomes. So not individual yis, but their expectation. 460 00:54:53.500 --> 00:55:02.369 David Stephens, Prof: So, for example, here, this is the expected value of the potential outcome. If everybody in the population was assigned treatment, little Red Z. 461 00:55:05.570 --> 00:55:11.669 David Stephens, Prof: We could consider subgroup specific. So take particular strata of the population 462 00:55:11.820 --> 00:55:14.159 David Stephens, Prof: and look at the same kind of causal effect. 463 00:55:14.560 --> 00:55:18.769 David Stephens, Prof: We could also look at conditional versions of this, so if 464 00:55:19.220 --> 00:55:25.780 David Stephens, Prof: the predictor or confounder took a particular value, what would be the causal effect of that value. 465 00:55:27.580 --> 00:55:28.830 David Stephens, Prof: So 466 00:55:29.110 --> 00:55:39.999 David Stephens, Prof: we could look at these, and in passing in a couple of places we'll think about particularly the second one. But I'm going to focus mainly on this average across the population 467 00:55:40.320 --> 00:55:41.300 David Stephens, Prof: effect. 468 00:55:41.710 --> 00:55:42.460 David Stephens, Prof: Right? 469 00:55:43.180 --> 00:55:48.399 David Stephens, Prof: So this is not a contrast. This is just the expected outcome in the population. 470 00:55:50.080 --> 00:55:55.880 David Stephens, Prof: If I intervened to set the treatment equal to Little Red Z. 471 00:55:57.050 --> 00:56:01.440 David Stephens, Prof: Just some numerical value right? 472 00:56:02.170 --> 00:56:09.460 David Stephens, Prof: And that leads us to the most common kind of causal estimate, which is the average treatment effect. So the average treatment effect is the 473 00:56:09.600 --> 00:56:16.240 David Stephens, Prof: difference between the 2 expected counterfactual outcomes across the population 474 00:56:17.580 --> 00:56:23.779 David Stephens, Prof: right? If the end. If the outcome itself is binary, then this corresponds to a probability. 475 00:56:24.490 --> 00:56:31.190 David Stephens, Prof: and then we can think about odds or odds ratios as being the causal measures of interest. 476 00:56:36.220 --> 00:56:48.960 David Stephens, Prof: That's not the only kind of causal estimate we'd look at. We'll also potentially be able to look at the average treatment effect on the treated, which is the same kind of causal contrast, but only amongst those people that were 477 00:56:49.800 --> 00:56:53.659 David Stephens, Prof: that were treated in in the population. 478 00:56:54.480 --> 00:56:58.040 David Stephens, Prof: although sometimes they can be harder to interpret. We'll look at 479 00:56:58.800 --> 00:57:01.680 David Stephens, Prof: the the general methods which allow 480 00:57:01.900 --> 00:57:07.483 David Stephens, Prof: estimation of this this kind of average treatment effect. But we won't 481 00:57:10.130 --> 00:57:18.400 David Stephens, Prof: tailor the specific kinds of analysis to this analysis. Just recognize that the methods could be extended to this very easily. 482 00:57:18.640 --> 00:57:40.680 David Stephens, Prof: and before we go to a 5 min break, I'll just mention this particular example that you can have a look at over the next couple of minutes. This is an example where the average treatment effect on the treated is a particular issue. So this is a study from Quebec, where we're looking at the effect of antidepressants on pregnancy outcomes. 483 00:57:41.220 --> 00:57:51.490 David Stephens, Prof: and essentially the average treatment effect on the treated is the difference in birth weights between antidepressant 484 00:57:52.000 --> 00:57:59.700 David Stephens, Prof: users and non antidepressant users hypothetically amongst only the population where antidepressants were used. 485 00:57:59.870 --> 00:58:09.740 David Stephens, Prof: Right? So it's a particular kind of causal effect, not averaging across the whole population. But instead, amongst the subgroup of individuals where antidepressants were used. 486 00:58:10.190 --> 00:58:18.169 David Stephens, Prof: Okay, so a break there for a few minutes. We'll start again at, I think, 31 and talk a bit more about 487 00:58:18.700 --> 00:58:24.820 David Stephens, Prof: this. This setup of the propensity score problem. Okay, so I'll start. I'll start again at 31 488 00:58:28.060 --> 00:58:29.560 David Stephens, Prof: and have a drink of water. 489 01:01:35.530 --> 01:01:43.780 David Stephens, Prof: Okay, then. So for the time, up until the break in half an hour. We're gonna think now about some more statistical 490 01:01:44.910 --> 01:01:52.130 David Stephens, Prof: components of this kind of analysis. So remember, our task is to think about comparing 491 01:01:55.120 --> 01:01:59.180 David Stephens, Prof: average potential outcomes across the population. 492 01:02:00.940 --> 01:02:03.000 David Stephens, Prof: And we're going to use that together. 493 01:02:03.520 --> 01:02:07.030 David Stephens, Prof: A view of the causal effect of treatment. 494 01:02:08.350 --> 01:02:12.799 David Stephens, Prof: Okay, so these are hypothetical quantities here. So this is the 495 01:02:16.010 --> 01:02:25.740 David Stephens, Prof: collection of outcomes assuming treatment. This is the collection outcome. Assuming no treatment, we're going to take the expected value of those 2 things, and that's going to be our 496 01:02:26.600 --> 01:02:33.680 David Stephens, Prof: estimate of the well, that's going to be a measure of the causal effect of changing from treatment 0 to treatment one. 497 01:02:34.040 --> 01:02:37.839 David Stephens, Prof: Okay, and do similar things in slightly different ways. 498 01:02:38.090 --> 01:02:43.400 David Stephens, Prof: All right. So given that we're going to focus on expectations. 499 01:02:43.930 --> 01:02:50.400 David Stephens, Prof: I'm gonna try to use data to learn about those expectations and differences. 500 01:02:50.620 --> 01:02:59.290 David Stephens, Prof: Clearly, the route we're going down is the route of comparing means in different groups. 501 01:03:00.580 --> 01:03:01.300 David Stephens, Prof: Right? 502 01:03:01.990 --> 01:03:02.910 David Stephens, Prof: So 503 01:03:03.750 --> 01:03:11.350 David Stephens, Prof: this takes us back to the world of 2 group comparison, of course, so if we were lucky enough to have 2 groups of individuals 504 01:03:12.450 --> 01:03:13.560 David Stephens, Prof: which were 505 01:03:14.100 --> 01:03:19.879 David Stephens, Prof: broadly comparable. But one of those groups had all been treated, and the other group had been not treated. 506 01:03:20.510 --> 01:03:21.460 David Stephens, Prof: then 507 01:03:21.750 --> 01:03:26.199 David Stephens, Prof: our task for cause limits would be very simple. We would just compare the means in the 2 groups. 508 01:03:27.630 --> 01:03:29.850 David Stephens, Prof: So we're going to take. 509 01:03:30.260 --> 01:03:36.350 David Stephens, Prof: We're going to do a lot of our analysis based on sample main type quantities. 510 01:03:36.540 --> 01:03:40.000 David Stephens, Prof: This is the usual estimator of the population mean? Obviously. 511 01:03:40.690 --> 01:03:44.310 David Stephens, Prof: now, we're going to have to manipulate this a little bit to answer the causal problem 512 01:03:45.140 --> 01:03:51.050 David Stephens, Prof: when we have observational data, because in that case we don't have 2 groups that are directly comparable. 513 01:03:53.440 --> 01:03:54.360 David Stephens, Prof: So 514 01:03:54.910 --> 01:04:10.280 David Stephens, Prof: the statistical analysis based on the sample mean is to is to construct an estimator of this so-called average potential outcome. And I'm going to use this notation. So mu brackets, Little Red Z will be the expected or average potential outcome 515 01:04:10.540 --> 01:04:13.380 David Stephens, Prof: at that level right? 516 01:04:16.650 --> 01:04:24.399 David Stephens, Prof: And the effective treatment that we're interested in is. 517 01:04:29.000 --> 01:04:30.979 David Stephens, Prof: I guess, captured graphically. 518 01:04:31.800 --> 01:04:40.220 David Stephens, Prof: or the setup of the problem is captured graphically by thinking about the same kind of dag that we had before, but now, imagining an intervention 519 01:04:40.820 --> 01:04:45.129 David Stephens, Prof: to set the value of Z equal to Little Red Z. 520 01:04:46.530 --> 01:04:54.030 David Stephens, Prof: Okay, so previously we had an arrow going from X into Z, right? That's the 521 01:04:54.250 --> 01:04:56.800 David Stephens, Prof: the model that generates our data. 522 01:04:57.750 --> 01:05:04.210 David Stephens, Prof: But our inference needs to be made for this dag without the arrow. 523 01:05:05.320 --> 01:05:12.029 David Stephens, Prof: Okay, but the setup is otherwise the same. We've just removed the arrow from X into Z again, and instead of 524 01:05:12.550 --> 01:05:17.320 David Stephens, Prof: X setting Z's value, we are setting Z's value. 525 01:05:20.580 --> 01:05:24.809 David Stephens, Prof: And I'm gonna use a little bit of mathematical notation here, because it helps. 526 01:05:25.130 --> 01:05:41.340 David Stephens, Prof: certainly, I think, understand the link between the statistical quantities, the estimators and the estimates. So there's a i'm going to just very briefly introduce this sort of mathematical view of expectation. So anybody that 527 01:05:42.460 --> 01:05:47.257 David Stephens, Prof: you know a a study. Probability and statistics will understand this stuff very 528 01:05:47.960 --> 01:05:52.030 David Stephens, Prof: straightforwardly. But if you haven't, don't worry too much, it's not too critical. 529 01:05:52.580 --> 01:06:02.669 David Stephens, Prof: So the average potential outcome is basically represented through this expectation form. So it's basically the expected value of Y taken with respect to this distribution. 530 01:06:03.930 --> 01:06:13.739 David Stephens, Prof: So you can sort of. Read that as saying, it's the average of the collection of possible Y values weighted by their probability of being observed. 531 01:06:14.080 --> 01:06:16.330 David Stephens, Prof: Probability. In a general sense, there. 532 01:06:17.230 --> 01:06:20.320 David Stephens, Prof: this is actually a density in this form. But anyway, 533 01:06:20.800 --> 01:06:24.999 David Stephens, Prof: so that's how we compute expectations. That's the rule for computing expectations. 534 01:06:25.840 --> 01:06:26.560 David Stephens, Prof: Right? 535 01:06:27.540 --> 01:06:34.750 David Stephens, Prof: Theoretically, this is the population version. This here is the probability density 536 01:06:35.270 --> 01:06:38.989 David Stephens, Prof: for the potential outcome at level Z, 537 01:06:40.310 --> 01:06:43.649 David Stephens, Prof: representing how likely, if you like, each of the 538 01:06:44.250 --> 01:06:46.910 David Stephens, Prof: outcomes is when treatment is at that level. 539 01:06:48.870 --> 01:06:57.179 David Stephens, Prof: Okay? And the one of the critical parts of the calculation actually is to recognize that that expectation which we could write in this way 540 01:06:58.510 --> 01:07:03.830 David Stephens, Prof: can actually also be rewritten in this way, which 541 01:07:04.480 --> 01:07:10.489 David Stephens, Prof: or and actually also has this interpretation. It's the average over the Y 542 01:07:11.620 --> 01:07:15.500 David Stephens, Prof: Z distribution, the Y bracket Z distribution. 543 01:07:15.930 --> 01:07:25.999 David Stephens, Prof: But we also recognize that, of course, that X causes YZ. So actually, there's a joint probability structure here between y bracket Z and 544 01:07:26.240 --> 01:07:27.060 David Stephens, Prof: X. 545 01:07:27.500 --> 01:07:32.739 David Stephens, Prof: So this expectation here is an expectation over, in fact, that joint distribution. 546 01:07:34.530 --> 01:07:40.269 David Stephens, Prof: So when we compute that average for the outcome, we recognize that it's an average over 547 01:07:40.730 --> 01:07:42.859 David Stephens, Prof: people with different X values. 548 01:07:44.750 --> 01:07:52.859 David Stephens, Prof: Right now, thinking about that joint distribution, we can use standard statistical. 549 01:07:53.200 --> 01:07:58.329 David Stephens, Prof: probabilistic manipulations to say, Well, that joint distribution we can break up as follows. 550 01:07:58.490 --> 01:08:04.589 David Stephens, Prof: we can break it into the conditional for y. Given x, and then the marginal for X. What does that mean? 551 01:08:04.760 --> 01:08:08.740 David Stephens, Prof: Well, to understand the joint variation of Y and X. 552 01:08:10.320 --> 01:08:16.539 David Stephens, Prof: At this particular treatment level we think about generating X first, st 553 01:08:19.109 --> 01:08:23.270 David Stephens, Prof: and then having obtained X, we think about generating Yz. 554 01:08:27.250 --> 01:08:34.839 David Stephens, Prof: So the individual person characteristics generated by the Fx distribution 555 01:08:35.380 --> 01:08:42.539 David Stephens, Prof: are used to understand or to specify the nature of the outcome. 556 01:08:43.319 --> 01:08:45.970 David Stephens, Prof: When we fix treatment equal to little Red Z. 557 01:08:47.560 --> 01:08:52.899 David Stephens, Prof: So in fact, this expectation here can be 558 01:08:53.601 --> 01:09:01.380 David Stephens, Prof: rewritten in a number of different ways, and we'll see Dasp coming up in the in the 559 01:09:01.810 --> 01:09:13.379 David Stephens, Prof: later calculations. So we can also think about extending that further and saying, Well, actually, there are 3 variables here. We've got XY, and Z. 560 01:09:14.010 --> 01:09:26.520 David Stephens, Prof: So this expectation is actually an average over a 3 dimensional probability distribution XY and Z. 561 01:09:26.710 --> 01:09:31.680 David Stephens, Prof: But where the that distribution has a specific structure, okay. 562 01:09:32.140 --> 01:09:35.789 David Stephens, Prof: it's the the structure that says, well. 563 01:09:36.109 --> 01:09:42.500 David Stephens, Prof: we're intervening to set the value of Z, so that probability, distribution is degenerate. At that point. 564 01:09:42.810 --> 01:09:46.950 David Stephens, Prof: The probability that the treatment takes the value little Red Z is one. 565 01:09:48.800 --> 01:09:54.629 David Stephens, Prof: So this expectation is an expectation over the 3 dimensional joint distribution. 566 01:09:55.910 --> 01:09:58.660 David Stephens, Prof: That's okay. This is just notation at this stage. 567 01:09:59.990 --> 01:10:07.240 David Stephens, Prof: this calculation that we're interested in here basically arises by saying, Well. 568 01:10:07.650 --> 01:10:09.670 David Stephens, Prof: we fix the value of Z, 569 01:10:10.650 --> 01:10:14.410 David Stephens, Prof: the treatment to be little red zed, and then 570 01:10:14.870 --> 01:10:26.260 David Stephens, Prof: we generate X and y, using the joint structure which 1st specifies X and then combines the 571 01:10:26.600 --> 01:10:36.160 David Stephens, Prof: information we have about the formation of Y into a conditional distribution for y given. X, right? 572 01:10:36.970 --> 01:10:39.650 David Stephens, Prof: So what that means is that 573 01:10:40.420 --> 01:10:48.000 David Stephens, Prof: we have an overall expectation that we write like this. So again, a theoretical calculation. 574 01:10:48.130 --> 01:10:50.329 David Stephens, Prof: But it's going to inspire 575 01:10:50.790 --> 01:10:55.960 David Stephens, Prof: one of the key calculations that we see later on in the course which is inverse probability, weighting. 576 01:10:56.910 --> 01:10:59.210 David Stephens, Prof: understanding. The structure of this 577 01:10:59.940 --> 01:11:07.310 David Stephens, Prof: expectation is key to understanding how we construct inverse probability, weighting estimators. That's why I mentioned it here. 578 01:11:08.620 --> 01:11:10.500 David Stephens, Prof: The other thing that 579 01:11:11.360 --> 01:11:18.700 David Stephens, Prof: I'd like to stress here is that this is all a theoretical calculation, and doesn't relate directly to data. 580 01:11:20.260 --> 01:11:26.040 David Stephens, Prof: right? Because here we have the 581 01:11:27.000 --> 01:11:32.509 David Stephens, Prof: conditional distribution of the hypothetical outcome. Yz give an X. 582 01:11:33.660 --> 01:11:38.519 David Stephens, Prof: But we don't have data from the hypothetical distribution. We have observational data. 583 01:11:38.860 --> 01:11:44.300 David Stephens, Prof: And in the observational data case, we don't get to manipulate z independently. 584 01:11:45.520 --> 01:11:51.000 David Stephens, Prof: So essentially, we have no data to implement an estimation procedure 585 01:11:51.180 --> 01:12:02.679 David Stephens, Prof: that would allow us to estimate this expectation. Estimating this expectation on the left hand side here. That's still the key. That's our goal, because it's only through that expectation that we can understand causal effects. 586 01:12:03.310 --> 01:12:07.400 David Stephens, Prof: But the challenge is, we don't have data that allows us to access that directly. 587 01:12:08.800 --> 01:12:20.270 David Stephens, Prof: So the whole framework of causal inference is about facilitating that calculation, using data to allow us to estimate something that is otherwise not estimatable. 588 01:12:24.400 --> 01:12:25.210 David Stephens, Prof: So 589 01:12:30.850 --> 01:12:35.040 David Stephens, Prof: in this model, to perform estimation. 590 01:12:35.440 --> 01:12:41.189 David Stephens, Prof: If we had experimental data where this calculation was 591 01:12:42.730 --> 01:12:52.300 David Stephens, Prof: directly related to our data collection, then our task is easy. We just estimate the expectation by taking the sample mean, of the outcomes? 592 01:12:53.180 --> 01:12:59.500 David Stephens, Prof: Right? So if we had data generated from this model, then 593 01:12:59.880 --> 01:13:01.770 David Stephens, Prof: causal inference wouldn't be a thing 594 01:13:03.140 --> 01:13:12.160 David Stephens, Prof: right. This is why the randomized, controlled trial. Experimental study is considered a gold standard for learning about causal effects. 595 01:13:12.510 --> 01:13:14.329 David Stephens, Prof: Right? We have no confounding. 596 01:13:14.640 --> 01:13:18.479 David Stephens, Prof: There's no influence of extraneous variables on the treatment 597 01:13:18.970 --> 01:13:21.520 David Stephens, Prof: we, the experimenter, gets to set the treatment. 598 01:13:21.760 --> 01:13:26.120 David Stephens, Prof: so there is no possibility of of a 599 01:13:26.400 --> 01:13:31.409 David Stephens, Prof: malign effect of other variables on the on understanding of of the treatment effect. 600 01:13:31.910 --> 01:13:37.790 David Stephens, Prof: So if the data were generated from this model, as in the experimental study. 601 01:13:38.110 --> 01:13:42.890 David Stephens, Prof: we really are just computing an estimator which is based on the sample mean 602 01:13:43.220 --> 01:13:45.279 David Stephens, Prof: literally, nothing else needs to be done. 603 01:13:47.250 --> 01:13:50.070 David Stephens, Prof: We could then manipulate that, using 604 01:13:51.710 --> 01:14:02.370 David Stephens, Prof: standard statistical ideas of invariance, and so on. To understand, let's say, an odds ratio. Sorry an odds by just looking at the ratio of those quantities, for example. 605 01:14:04.750 --> 01:14:11.769 David Stephens, Prof: and as a side note here which I find I won't talk about this too much, but that I like to 606 01:14:11.990 --> 01:14:20.820 David Stephens, Prof: make the analogy at this point between statistical estimation and something I know a lot more about, because it's something I've worked on a lot in my career, which is Monte Carlo methods. 607 01:14:20.980 --> 01:14:25.730 David Stephens, Prof: So the kind of expectation that we've just seen here 608 01:14:26.880 --> 01:14:34.110 David Stephens, Prof: looks a bit like this one. So this is the expectation of the function. Gy of the random variable Y, which has got this distribution. FY, 609 01:14:34.210 --> 01:14:37.789 David Stephens, Prof: right? That's a standard statistical expectation. 610 01:14:38.790 --> 01:14:43.890 David Stephens, Prof: It's an integral with respect taken with respect to a probability distribution. That's how expectations work. 611 01:14:44.780 --> 01:14:52.790 David Stephens, Prof: Now, we know that we can approximate these integrals using so-called Monte Carlo methods. 612 01:14:53.070 --> 01:15:00.150 David Stephens, Prof: Right? If we can't do this integral numerically to calculate the theoretical expectation of a distribution 613 01:15:00.360 --> 01:15:02.099 David Stephens, Prof: which we often have to do in 614 01:15:02.410 --> 01:15:04.510 David Stephens, Prof: homework problems and things like that. 615 01:15:06.320 --> 01:15:09.510 David Stephens, Prof: or to understand the properties of estimators in real statistics. 616 01:15:10.370 --> 01:15:18.440 David Stephens, Prof: we would have to compute that integral. And sometimes that's hard. So we can replace the analytical calculation by a numerical calculation. 617 01:15:19.030 --> 01:15:25.900 David Stephens, Prof: And Monte Carlo does that in the following way, it generates a sample of size, n, from the density 618 01:15:26.580 --> 01:15:33.480 David Stephens, Prof: and then averages the G's evaluated the sampled values right? 619 01:15:33.710 --> 01:15:38.240 David Stephens, Prof: Generate from this, using a random number generator average. The 620 01:15:38.430 --> 01:15:42.450 David Stephens, Prof: resulting computed G's for those generated y's 621 01:15:43.870 --> 01:15:51.340 David Stephens, Prof: right. And the idea is that that estimator or that estimate in this case, provides a good approximation of the interval. That's how Monte Carlo works. 622 01:15:53.350 --> 01:15:59.869 David Stephens, Prof: And of course, actually, this is how frequentous statistics works as well. If we want to understand 623 01:16:00.690 --> 01:16:10.360 David Stephens, Prof: averages, population averages in a health or epidemiological setting. What we do is collect a large Iid sample, a large random sample from the population. 624 01:16:12.330 --> 01:16:16.590 David Stephens, Prof: So in the for Qantas statistics world. 625 01:16:16.770 --> 01:16:22.660 David Stephens, Prof: we don't generate the observations from some distribution. Using a random number generator. 626 01:16:23.060 --> 01:16:26.479 David Stephens, Prof: we collect data from the population. 627 01:16:27.500 --> 01:16:34.119 David Stephens, Prof: and then we form estimates from those data by taking simple summaries, like means and variances, and so on. 628 01:16:34.830 --> 01:16:39.429 David Stephens, Prof: and then, if the sample size is large enough, the estimate will be close to the true value. 629 01:16:39.740 --> 01:16:47.200 David Stephens, Prof: So my point in in in writing this here at this point, making this note is that 630 01:16:48.380 --> 01:16:52.510 David Stephens, Prof: we are going to be faced with exactly this problem in causal inference. 631 01:16:53.040 --> 01:16:53.870 David Stephens, Prof: Right? 632 01:16:54.210 --> 01:16:55.840 David Stephens, Prof: We will have data. 633 01:16:56.450 --> 01:17:00.849 David Stephens, Prof: We want to estimate an expectation. But it turns out the data we have 634 01:17:02.190 --> 01:17:06.289 David Stephens, Prof: aren't really the right data for estimating the thing we want to estimate. 635 01:17:06.580 --> 01:17:14.850 David Stephens, Prof: so we won't have direct access to the estimate, to the estimator. Sorry without other treatment of the data 636 01:17:17.670 --> 01:17:21.070 David Stephens, Prof: and the key link for important sampling. 637 01:17:21.240 --> 01:17:25.410 David Stephens, Prof: Sorry for cause. Estimation is the idea of importance sampling. 638 01:17:26.170 --> 01:17:28.900 David Stephens, Prof: and I put a recap at the back of the 639 01:17:29.550 --> 01:17:31.469 David Stephens, Prof: again at the back of the 640 01:17:31.820 --> 01:17:38.699 David Stephens, Prof: notes here to talk through some of these ideas in more detail. But the fundamental idea is that what we need to do 641 01:17:38.830 --> 01:17:42.330 David Stephens, Prof: is to take our observed data, sample 642 01:17:42.590 --> 01:17:51.079 David Stephens, Prof: and reweight them in a particular way, such that when we take the sample average that matches the target 643 01:17:54.320 --> 01:17:55.400 David Stephens, Prof: S demand. 644 01:17:57.960 --> 01:18:12.290 David Stephens, Prof: so this is somewhat like the idea of standardization in epidemiology and statistics. We want to make inference from one inference in one population with data from another population. So the way we do that is to 645 01:18:12.540 --> 01:18:22.129 David Stephens, Prof: form standardization based estimators so standardizing to correct for the fact. Let's say that the age profile in one population is different from the age, profile. 646 01:18:22.300 --> 01:18:24.720 David Stephens, Prof: age, profile in another population. 647 01:18:24.870 --> 01:18:25.550 David Stephens, Prof: Right? 648 01:18:25.800 --> 01:18:30.720 David Stephens, Prof: So the idea here is that in statistics 649 01:18:31.490 --> 01:18:38.389 David Stephens, Prof: this idea of collecting an Iid sample and taking an average only gets us so far. 650 01:18:39.770 --> 01:18:46.930 David Stephens, Prof: What we will have to do in a couple of places is collect that sample, reweight them appropriately. 651 01:18:47.230 --> 01:18:52.839 David Stephens, Prof: and then use the reweighted samples to form an average, to estimate the thing we want to estimate. 652 01:18:53.830 --> 01:19:01.630 David Stephens, Prof: And, in fact, this method of reweighting is key to breaking, confounding in observational studies at least in one of the approaches. 653 01:19:06.994 --> 01:19:09.999 David Stephens, Prof: Couple couple of other things I wanted to mention. 654 01:19:10.200 --> 01:19:11.850 David Stephens, Prof: 1st of all. 655 01:19:12.740 --> 01:19:21.320 David Stephens, Prof: the kind of average potential outcome that I've just referred to is a so-called marginal measure, meaning 656 01:19:21.430 --> 01:19:30.730 David Stephens, Prof: nothing more, that that I want the average potential outcome so that I can form form causal contrasts across the whole population. 657 01:19:31.060 --> 01:19:41.560 David Stephens, Prof: So it's marginal across the whole population, averaging across the whole population as represented in this formula by thinking about averaging over the Fx distribution. 658 01:19:42.970 --> 01:19:50.780 David Stephens, Prof: Right? So this formula, it's a slightly simpler formula than one of the ones we saw before is 659 01:19:51.660 --> 01:19:57.570 David Stephens, Prof: given to us by saying, well, the average 660 01:19:58.360 --> 01:20:00.880 David Stephens, Prof: potential outcome at treatment level Z 661 01:20:01.170 --> 01:20:10.609 David Stephens, Prof: can be thought of as the average of the conditional expectation of Y at that level. Z. 662 01:20:12.380 --> 01:20:16.910 David Stephens, Prof: If I condition on X and then average over this X's 663 01:20:17.350 --> 01:20:24.119 David Stephens, Prof: right. So this is something like an iterated expectation formula for those people that understand that have met that before. 664 01:20:25.390 --> 01:20:36.469 David Stephens, Prof: So this is the key. If it so, if we had data available, this would be, in fact, the formula that we would use. And again, we can view this as a Monte Carlo formula, because it says. 665 01:20:37.022 --> 01:20:44.560 David Stephens, Prof: well, generate from the X's, and then generate from the Y given X and Z distribution right 666 01:20:44.670 --> 01:20:47.240 David Stephens, Prof: in an experimental study. 667 01:20:47.770 --> 01:20:54.799 David Stephens, Prof: We have precisely the data that allow us to take those individuals and average their outcomes 668 01:20:56.250 --> 01:21:03.820 David Stephens, Prof: in order to get an estimate of this, because in the experimental study. 669 01:21:04.710 --> 01:21:10.490 David Stephens, Prof: We get an Iid sample from the X distribution because people 670 01:21:11.270 --> 01:21:16.860 David Stephens, Prof: bring their own characteristics with them off the street. And it's a random sample of the population. At least, that's the assumption. 671 01:21:17.200 --> 01:21:25.470 David Stephens, Prof: And then, because in the experimental study we are allocating treatment Z. 672 01:21:27.010 --> 01:21:36.989 David Stephens, Prof: Independently of acts, we then also have a sample from this conditional distribution. 673 01:21:37.700 --> 01:21:39.390 David Stephens, Prof: So we have 674 01:21:39.570 --> 01:21:46.560 David Stephens, Prof: a sample from that distribution. And therefore, if we average the Y's that gives us an estimator of this 675 01:21:47.920 --> 01:21:49.250 David Stephens, Prof: target quantity. 676 01:21:49.530 --> 01:21:56.799 David Stephens, Prof: So I mentioned that because this is called well, at least in some places called the G computation formula, it tells us how to 677 01:21:57.200 --> 01:22:00.469 David Stephens, Prof: frame the calculation of the 678 01:22:05.117 --> 01:22:17.580 David Stephens, Prof: of an estimator of the quantity of interest, the estimate of interest in terms of these distributions, right? 679 01:22:22.690 --> 01:22:28.500 David Stephens, Prof: So key assumption here is that X's that are independent, which is what we get in the experimental study. 680 01:22:32.560 --> 01:22:52.090 David Stephens, Prof: just to point out that. And this is a more general statistical point than one related to causal inference that marginal measures represented in this way are different from conditional measures. So we might think about interpreting the conditional effect of Z through the conditional model 681 01:22:53.770 --> 01:22:56.019 David Stephens, Prof: rather than the joint model. 682 01:22:57.300 --> 01:23:00.069 David Stephens, Prof: And so this is. 683 01:23:01.120 --> 01:23:08.549 David Stephens, Prof: you know, the kind of phenomenon that we encounter in statistics generally when we think about non-collapsible models. 684 01:23:08.980 --> 01:23:18.690 David Stephens, Prof: So the parameter in a in a logistic regression, say a coefficient that appears in a logistic regression which might look like a conditional odds ratio. Say 685 01:23:20.080 --> 01:23:28.310 David Stephens, Prof: it's not the same parameter that we would get if we average that over the X distribution to to think about the marginal odds ratio. 686 01:23:29.330 --> 01:23:41.920 David Stephens, Prof: And so this is, this idea of non-collapsibility is common in statistics? I think so just pointing out that we have to be aware that marginal measures are not the same as conditional measures 687 01:23:42.310 --> 01:23:43.810 David Stephens, Prof: in most models 688 01:23:47.870 --> 01:23:55.449 David Stephens, Prof: soap to go into the break. I'm going to remind you, have the 689 01:23:55.690 --> 01:24:01.930 David Stephens, Prof: the simpler case in order to set up the more difficult case that we'll study in the second section. 690 01:24:03.680 --> 01:24:07.810 David Stephens, Prof: So I've spoken about estimating quantities. 691 01:24:08.100 --> 01:24:17.600 David Stephens, Prof: We framed the problem through integration through the G computation formula in the case where the treatment and the 692 01:24:20.728 --> 01:24:25.610 David Stephens, Prof: covariates X are independent, because 693 01:24:25.800 --> 01:24:34.360 David Stephens, Prof: we have chosen to intervene, to change the treatment to be some value. Little Red said, independently of X. 694 01:24:36.280 --> 01:24:43.589 David Stephens, Prof: So this corresponds more or less to a randomized study or randomized study is a slightly 695 01:24:48.360 --> 01:24:50.579 David Stephens, Prof: different version of the same formulation. 696 01:24:51.850 --> 01:24:52.910 David Stephens, Prof: So 697 01:24:53.150 --> 01:25:02.580 David Stephens, Prof: the way I'm going to set this up is to think about 2 forms of the randomized study, and then we'll see the consequences of the calculations that we've laid out mathematically beforehand. 698 01:25:03.480 --> 01:25:13.949 David Stephens, Prof: So in a randomized study, we're gonna imagine collecting a random sample from the population and then 699 01:25:16.360 --> 01:25:21.600 David Stephens, Prof: acting in one of 2 ways. The 1st way we're going to think about is 700 01:25:22.000 --> 01:25:25.450 David Stephens, Prof: taking the random sample from the population 701 01:25:25.670 --> 01:25:31.139 David Stephens, Prof: and arbitrarily splitting them up into 2 equal groups of sized n, okay. 702 01:25:32.310 --> 01:25:34.230 David Stephens, Prof: so this is not the most common 703 01:25:34.680 --> 01:25:40.720 David Stephens, Prof: version, but it it's a it serves to illustrate the calculation. 704 01:25:42.260 --> 01:25:49.579 David Stephens, Prof: So we've got a total sample size of 2 n. Randomly selected from the population. Those people are bringing with them their X's 705 01:25:50.580 --> 01:25:53.390 David Stephens, Prof: X covariates. 706 01:25:56.100 --> 01:26:03.840 David Stephens, Prof: We take that population. We split it at random into 2 parts. So those 2 groups are comparable in terms of their X characteristics. 707 01:26:05.210 --> 01:26:12.370 David Stephens, Prof: We then intervene to give the 1st group the treatment. 708 01:26:13.320 --> 01:26:15.789 David Stephens, Prof: and in the second group we give no treatment. 709 01:26:16.480 --> 01:26:24.549 David Stephens, Prof: so the 1st group of N are assigned. The exposure and form, the exposed group, and the second group are left untreated, and therefore are unexposed. 710 01:26:26.080 --> 01:26:32.260 David Stephens, Prof: So these groups are directly comparable 711 01:26:33.610 --> 01:26:37.809 David Stephens, Prof: in every aspect apart from their treatment. Status. 712 01:26:41.150 --> 01:26:45.250 David Stephens, Prof: in that case, estimating the causal effects of treatment is trivial. 713 01:26:45.960 --> 01:26:51.579 David Stephens, Prof: because all we need to do is to compare the mean in the treatment group 714 01:26:52.430 --> 01:26:54.690 David Stephens, Prof: with the mean in the No treatment group. 715 01:27:01.440 --> 01:27:08.309 David Stephens, Prof: So the mean in the treated group is represented here by the average of the 1st sample average of the 1st n. Individuals 716 01:27:08.890 --> 01:27:13.009 David Stephens, Prof: and the mean in the no treatment group is estimated by the average in the 717 01:27:13.450 --> 01:27:15.660 David Stephens, Prof: second collection of N individuals. 718 01:27:16.470 --> 01:27:17.220 David Stephens, Prof: Right? 719 01:27:18.130 --> 01:27:24.310 David Stephens, Prof: So that's an obvious kind of approach, I would say. And we can be confident that it's giving an estimate of the 720 01:27:24.740 --> 01:27:29.729 David Stephens, Prof: target parameter, the causal contrast because the 2 halves are comparable. 721 01:27:30.320 --> 01:27:36.520 David Stephens, Prof: The 1st N individuals are exchangeable with the second second collision event. 722 01:27:37.360 --> 01:27:40.320 David Stephens, Prof: The only difference is due to the exposure assignment 723 01:27:41.910 --> 01:27:44.770 David Stephens, Prof: right? So if only the world were that simple. 724 01:27:46.170 --> 01:27:51.020 David Stephens, Prof: we wouldn't have a need for causal inference. And of course, in some 725 01:27:51.170 --> 01:27:54.970 David Stephens, Prof: settings, clinical trial settings. We can actually implement this. 726 01:27:55.130 --> 01:28:00.219 David Stephens, Prof: and it's considered well might not do it in exactly this way. But 727 01:28:00.450 --> 01:28:04.549 David Stephens, Prof: it's the regarded as the gold standard for getting at the causal effect 728 01:28:04.990 --> 01:28:07.979 David Stephens, Prof: of treatment. Right? So this is fairly simple. 729 01:28:09.410 --> 01:28:16.960 David Stephens, Prof: The other way we could, we could implement a randomized trial is to randomly allocate treatment to individuals 730 01:28:18.720 --> 01:28:21.350 David Stephens, Prof: that have joined the study participants. 731 01:28:21.810 --> 01:28:39.480 David Stephens, Prof: the participant. So we're going to now think about that version. So now we're going to have a single random sample of size, N from the population. But we're going to implement the treatment allocation in the following way, we're going to allocate treatment to each individual in turn. 732 01:28:40.510 --> 01:28:46.309 David Stephens, Prof: according to some coin flip with probability. P. 733 01:28:47.100 --> 01:28:47.830 David Stephens, Prof: Right. 734 01:28:48.160 --> 01:28:55.230 David Stephens, Prof: So 1st individual comes in off the street. You measure their X characteristics. You flip a coin with 735 01:28:55.700 --> 01:29:01.310 David Stephens, Prof: probability. P. Of getting a heads. If you get ahead, you give them treatment. If you get a tail you give them no treatment 736 01:29:02.800 --> 01:29:03.490 David Stephens, Prof: right. 737 01:29:03.840 --> 01:29:07.870 David Stephens, Prof: And then you keep doing that as people come in off the street independently. 738 01:29:08.760 --> 01:29:17.619 David Stephens, Prof: Alright. So in this case the coin flip doesn't depend on the X values. Right? So we're randomly allocating treatment. According to this mechanism. 739 01:29:18.790 --> 01:29:24.009 David Stephens, Prof: the number of people that end up treated is very easily seen to be a binomial, random, variable. 740 01:29:24.270 --> 01:29:28.699 David Stephens, Prof: and therefore the number treated I'm going to denote by n. 1 for the treated group. 741 01:29:29.446 --> 01:29:35.509 David Stephens, Prof: And what we can. And and it's going to be N. 0 for the No treatment group, and 742 01:29:35.790 --> 01:29:43.270 David Stephens, Prof: with a little red Z subscript is just gonna be an account of the number of individuals receiving that treatment right. So this is the 743 01:29:43.540 --> 01:29:47.250 David Stephens, Prof: most common way of implementing a 2 arm randomized trial. 744 01:29:50.700 --> 01:29:54.749 David Stephens, Prof: And in this case, again, causal estimation is easy. 745 01:29:54.970 --> 01:29:59.220 David Stephens, Prof: We just essentially compete the mean in the treatment group 746 01:30:00.070 --> 01:30:06.209 David Stephens, Prof: the treated group and commit the mean and non-treated group, and then do a 2 group comparison of those groups. 747 01:30:07.090 --> 01:30:12.740 David Stephens, Prof: Right? So that's using Formula One technically. But actually, that simplifies into these 2 forms. 748 01:30:12.890 --> 01:30:13.680 David Stephens, Prof: Right? 749 01:30:13.880 --> 01:30:20.040 David Stephens, Prof: We have. So this, this formula here just says, take the mean in treatment group, little Red Z. 750 01:30:20.440 --> 01:30:21.430 David Stephens, Prof: That's all. 751 01:30:22.340 --> 01:30:35.260 David Stephens, Prof: So we have the estimate of the mean under no treatment, the estimate of the mean under treatment, and we can then take the contrast of those 2 as an estimate of the causal effect of treatment. That's how randomized trials work right. 752 01:30:38.470 --> 01:30:44.619 David Stephens, Prof: Those ends are binomial random variables where we know the probability of 753 01:30:44.790 --> 01:30:50.899 David Stephens, Prof: no treatment or the probability of treatment. So the count that we get of the treated individuals and the no treated individuals. 754 01:30:51.740 --> 01:31:09.130 David Stephens, Prof: That's a known random, variable before we start the randomization. So what we could also do, in fact, is to simplify these formula by instead of using the actual number of treated individuals, we can instead use the expected number of treated individuals as the estimator. 755 01:31:10.740 --> 01:31:14.673 David Stephens, Prof: Okay, so why might you do this? Well, 756 01:31:15.470 --> 01:31:23.550 David Stephens, Prof: you might think, well, this is a more variable quantity here. So this is a constant. So it might be 757 01:31:24.120 --> 01:31:26.630 David Stephens, Prof: better statistically to do that, you might think. 758 01:31:27.270 --> 01:31:32.409 David Stephens, Prof: but we can still end up contrasting this one with this one and getting an estimate of the cause and effect. 759 01:31:32.700 --> 01:31:36.240 David Stephens, Prof: Okay, so that's possible procedure, too. 760 01:31:39.450 --> 01:31:44.899 David Stephens, Prof: Okay, so with those formula in mind. I'm gonna break there for for the half hour. 761 01:31:45.756 --> 01:31:50.570 David Stephens, Prof: At the halfway point of this 1st day. 762 01:31:52.220 --> 01:31:58.367 David Stephens, Prof: And we'll start again on the half hour. So 1 30. My time on the East coast. 763 01:32:00.270 --> 01:32:03.349 David Stephens, Prof: What I've tried to do so far is to set up the problem 764 01:32:04.860 --> 01:32:20.400 David Stephens, Prof: so that the notation is understandable. So hopefully, all of these things have been, you know, straightforwardly framed. Because the next thing we're going to do is to understand why this doesn't work in observational studies and why we need to adjust by the propensity score. 765 01:32:21.610 --> 01:32:24.890 David Stephens, Prof: Okay, so I'll stop there and we'll start again on the half hour. 766 01:32:25.280 --> 01:32:26.020 David Stephens, Prof: Thanks.