WEBVTT 00:00:05.000 --> 00:00:12.000 hello everybody and welcome to module 10. we're just about halfway through the 00:00:12.000 --> 00:00:18.000 multi institute and i hope that you're becoming more comfortable with the knowledge and you're able to apply it to 00:00:18.000 --> 00:00:24.000 your capstone projects if you haven't already please respond to 00:00:24.000 --> 00:000:30.000 the email requesting your preferred capstone presentation date we'd like to 00:000:30.000 --> 00:00:37.000 honor your first preference if at all possible today we have the third lecture in our 00:00:37.000 --> 00:00:42.000 quantitative methods series we are bringing great britain to multi 00:00:42.000 --> 00:00:49.000 today and kicking us off is dr richard emsley from king's college london 00:00:49.000 --> 00:00:55.000 dr ensley has a teaching style like no one else with his ability to take the 00:00:55.000 --> 00:01:00.000 complicated topics of moderation and mediation and apply the concepts to 00:01:00.000 --> 00:01:05.000 multi-level models hello everyone my name is richard ensley 00:01:05.000 --> 00:01:11.000 i'm from king's college london in the uk and i'm a professor of medical statistics and clinical trials 00:01:11.000 --> 00:01:18.000 methodology i'm delighted to be joining you today to take you through module 10 on the mlti 00:01:18.000 --> 00:01:28.000 course looking at quantitative analytic techniques 00:01:28.000 --> 00:01:35.000 our learning objectives for this session are to understand what is meant by mediator and moderator analysis 00:01:35.000 --> 00:01:41.000 to understand the aspects of study designs allowing such analyses to be applied and to identify suitable 00:01:41.000 --> 00:01:49.000 quantitative methods for addressing these questions in multi-level interventions 00:01:49.000 --> 00:01:55.000 this session will be split into two parts in the first we'll look at some explanatory questions in clinical 00:01:55.000 --> 00:02:01.000 effectiveness and implementation settings and the issue of moderation and in the second video we'll look at 00:02:01.000 --> 00:02:13.000 mediation of effects via post-treatment variables and some extensions to multi-level models 00:02:13.000 --> 00:02:18.000 let's look at some explanatory questions in clinical effectiveness trials 00:02:18.000 --> 00:02:25.000 so one question might be what's a moderation of a treatment effect or prediction of the treatment response we 00:02:25.000 --> 00:02:32.000 want to know for whom does the treatment work and typically this will be on some variable that we refer to as a moderator 00:02:32.000 --> 00:02:39.000 which is measured at baseline we might be interested in the mediation of a treatment effect by a particular 00:02:39.000 --> 00:02:44.000 treatment target this this answers the question how does the treatment work 00:02:44.000 --> 00:02:50.000 fire which clinical targets does the treatment bring about to change in the clinical outcome 00:02:50.000 --> 00:02:57.000 typically those mediators are measured post baseline we may be also interested in some 00:02:57.000 --> 00:03:02.000 therapeutic process evaluation asking is the treatment effect stronger 00:03:02.000 --> 00:03:10.000 depending on some therapeutic process and again typically we'd measure the therapeutic process post baseline 00:03:10.000 --> 00:03:18.000 and we also need strong baseline predictors of that process status itself 00:03:18.000 --> 00:03:23.000 how do those questions translate into implementation effectiveness trials 00:03:23.000 --> 00:03:30.000 well for moderation we could be looking at the moderation of the effect of an implementation strategy 00:03:30.000 --> 00:03:35.000 for whom is the implementation strategy effective for example for which type of therapist 00:03:35.000 --> 00:03:41.000 or clinic was the implementation strategy effective for mediation we may be interested in 00:03:41.000 --> 00:03:48.000 mediation of a treatment event via the implementation aspect so how much of the treatment effect is transmitted via some 00:03:48.000 --> 00:03:53.000 implementation aspects and for post randomization modification 00:03:53.000 --> 00:03:59.000 this would be implementation strategy process evaluation so for example is the 00:03:59.000 --> 00:04:04.000 treatment effect stronger dependent on some therapeutic or organizational 00:04:04.000 --> 00:04:10.000 processes which can only be measured after the start of the study 00:04:10.000 --> 00:04:17.000 one of the key differences between these two is what we refer to as the unit of measurement so for clinical 00:04:17.000 --> 00:04:24.000 effectiveness these measures are typically at the level of the individual participant in the study 00:04:24.000 --> 00:04:30.000 whereas for implementation effectiveness these these measures could be at the level of either the individual 00:04:30.000 --> 00:04:36.000 participant the trainer or the therapist who's delivering an intervention or change 00:04:36.000 --> 00:04:45.000 or the organizational level for example clinics hospital systems or workplaces 00:04:45.000 --> 00:04:51.000 we're now going to consider the topic of moderation by baseline variables 00:04:51.000 --> 00:04:57.000 to do this we'll introduce some notation that we'll use throughout this session 00:04:57.000 --> 00:05:11.000 this slide is here as a reference slide for you to come back to and see what each of the letters correspond to 00:05:11.000 --> 00:05:19.000 we know that if there is a significant correlation between two variables say an exposure variable r and some 00:05:19.000 --> 00:05:24.000 outcome y then there has to be one of four possible reasons for that 00:05:24.000 --> 00:05:30.000 significant association either r is a direct cause of y 00:05:30.000 --> 00:05:35.000 as shown in the first diagram either y causes r 00:05:35.000 --> 00:05:40.000 as shown from the arrow going from the y box to r 00:05:40.000 --> 00:05:47.000 either r and y share a common cause so that we see an association between 00:05:47.000 --> 00:05:53.000 our two variables of interest but this is because there's it's common cause c which is a cause of 00:05:53.000 --> 00:05:59.000 both r and y indicated by these red arrows here 00:05:59.000 --> 00:06:06.000 all r and y are conditioned on a common descendant in either the data design or 00:06:06.000 --> 00:06:14.000 the data analysis so if there is a common variable say s which is a cause of both r and y 00:06:14.000 --> 00:06:21.000 and we condition on that variable either by including it in our statistical models or through selection 00:06:21.000 --> 00:06:27.000 in the study design we can induce an association between r and y 00:06:27.000 --> 00:06:37.000 and if we see an association it has to be because of one of these four explanations 00:06:37.000 --> 00:06:42.000 when we talk about moderation of treatment effects the key point here is that the 00:06:42.000 --> 00:06:48.000 association between r and y is not the same at different values or 00:06:48.000 --> 00:06:53.000 levels of some covariate x in other words there's a modifier 00:06:53.000 --> 00:07:00.000 which is a variable which alters our relationship between this independent variable of interest r and our dependent 00:07:00.000 --> 00:07:05.000 variable y and this is defined in a paper by byron 00:07:05.000 --> 00:07:12.000 and kenny as treatment moderators specify for whom and under what conditions the treatment works that's 00:07:12.000 --> 00:07:19.000 clearly a very very pertinent and relevant question to ask in many contexts 00:07:19.000 --> 00:07:25.000 so it informs clinicians perhaps which of their patients might be most responsive to the treatment and for 00:07:25.000 --> 00:07:32.000 which patients other perhaps more appropriate treatments might be solved and this is 00:07:32.000 --> 00:07:37.000 part of the underlying concept of personalized or stratified medicine 00:07:37.000 --> 00:07:44.000 moderators can also be used to identify subpopulations with possibly different causal mechanisms or course of illness 00:07:44.000 --> 00:07:52.000 and this may be helpful for example in restructuring diagnostic classification based on underlying etiology rather than 00:07:52.000 --> 00:07:58.000 presentation of symptoms the key distinction to make is that 00:07:58.000 --> 00:08:05.000 between prognosis and prediction so a prognostic biomarker is a 00:08:05.000 --> 00:08:11.000 biological measurement made before treatment which indicates the long-term outcome for patients whether they're 00:08:11.000 --> 00:08:16.000 treated or untreated and so they basically predict which 00:08:16.000 --> 00:08:22.000 participants will have an improved outcome regardless of the treatment that they receive 00:08:22.000 --> 00:08:27.000 this contrasts with a predictive or moderation effect where this is a 00:08:27.000 --> 00:08:34.000 measurement made before treatment to identify which participant is likely or unlikely to benefit from a particular 00:08:34.000 --> 00:08:39.000 treatment so we're talking here about things that predict differential response to 00:08:39.000 --> 00:08:46.000 treatment as an example within the oncology field boys talks about over expression of the 00:08:46.000 --> 00:08:53.000 her2 gene in patients with early breast cancer this is an example of a biomarker that has birth the prognostic value because 00:08:53.000 --> 00:08:59.000 patients with her2 overexpression typically have a worse prognosis but also has a predictive value for the 00:08:59.000 --> 00:09:06.000 treatment herceptin because patients with a her2 over expression are more likely to be 00:09:06.000 --> 00:09:11.000 deriving a benefit from that particular treatment 00:09:11.000 --> 00:09:18.000 this slide shows the difference between prognostic and a predictive marker in the graph on the left hand side we 00:09:18.000 --> 00:09:25.000 see age represented as a prognostic marker so on the x-axis we have 00:09:25.000 --> 00:09:30.000 our age and on the y-axis we have improvement our outcome and let's assume 00:09:30.000 --> 00:09:36.000 that a higher score indicates more improvement the red line represents 00:09:36.000 --> 00:09:43.000 the treatment arm and the black line represents the control arm and what we can see is that as age 00:09:43.000 --> 00:09:48.000 increases so the value of the outcome also increases 00:09:48.000 --> 00:09:55.000 but that this increase is the same in both the treatment and the control arms so the treatment effect which is the 00:09:55.000 --> 00:10:00.000 difference between the treatment and the control arms is the same across the 00:10:00.000 --> 00:10:07.000 levels of age on the right hand side we see a representation of age as a moderator or 00:10:07.000 --> 00:10:14.000 predictive marker so again age is on the x-axis our red line represents the treatment 00:10:14.000 --> 00:10:19.000 arm and our black line represents the control arm and what we can see is that whilst age 00:10:19.000 --> 00:10:25.000 is also prognostic so the value of the outcome varies according to age it 00:10:25.000 --> 00:10:33.000 differentially changes between the treatment and the control arm and in fact there is an inflection point 00:10:33.000 --> 00:10:38.000 where to the left of where the lines cross we would recommend giving the control 00:10:38.000 --> 00:10:45.000 because the black line is higher than the red line and to the right of that cross point we would recommend giving 00:10:45.000 --> 00:10:50.000 treatment because the red line is higher than the black line and so this is what's known as a 00:10:50.000 --> 00:10:56.000 qualitative interaction 00:10:56.000 --> 00:11:03.000 we can represent the difference between prognosis and moderating effects using these kind of structural diagrams 00:11:03.000 --> 00:11:09.000 that correspond to the graphs we saw on the previous slide so on the left we see a diagram of a 00:11:09.000 --> 00:11:15.000 variable which is prognostic of treatment response we have an effective treatment 00:11:15.000 --> 00:11:21.000 influencing outcome and we have an additional predictor such as age also predicting outcome 00:11:21.000 --> 00:11:29.000 on the right we see a moderator of treatment response so treatment is a predictor of outcome 00:11:29.000 --> 00:11:36.000 the predictor itself is associated with the outcome and the treatment by predictor interaction term 00:11:36.000 --> 00:11:42.000 the cross product between those is also associated with the outcome and this 00:11:42.000 --> 00:11:50.000 interaction is what answers the question for whom does the treatment work and is the essence of personalized or precision 00:11:50.000 --> 00:11:56.000 medicine how does one assess affect modification 00:11:56.000 --> 00:12:03.000 well in a regression model approach we would include baseline moderators of the treatment outcome variables 00:12:03.000 --> 00:12:09.000 so we would include in the set of predictors or independent variables in the model both the treatment time 00:12:09.000 --> 00:12:15.000 variable the baseline moderator variable and the interaction between the 00:12:15.000 --> 00:12:20.000 treatment arm and the baseline variable so in this context of regression 00:12:20.000 --> 00:12:27.000 analysis when we're assessing effect modification or moderation this is the same as assessing for an interaction 00:12:27.000 --> 00:12:34.000 effect between the two variables and this will be true in both the single level and in the multi-level modeling 00:12:34.000 --> 00:12:39.000 setting to assess the significance of effect 00:12:39.000 --> 00:12:45.000 modification we'd follow three steps the first step is that we would need a 00:12:45.000 --> 00:12:51.000 new variable the cross product or the interaction between our exposure r and 00:12:51.000 --> 00:12:58.000 our modifier x and so we denote this by r by x 00:12:58.000 --> 00:13:05.000 in step two we consider the linear regression to establish the relationships between our outcome y our 00:13:05.000 --> 00:13:11.000 exposure on the covariate x and if we had a linear regression model 00:13:11.000 --> 00:13:16.000 where y is a function of the exposure and the covariance we would add this new 00:13:16.000 --> 00:13:22.000 interaction or cross product term to the regression model here 00:13:22.000 --> 00:13:27.000 so we have that our outcome is a function of an intercept plus an effect 00:13:27.000 --> 00:13:35.000 of the randomization plus the effect of the covariates plus the interaction effect of the covariance 00:13:35.000 --> 00:13:42.000 in step three our primary focus for effect modification would be a significance test of the coefficient 00:13:42.000 --> 00:13:48.000 beta3 so we would have a null hypothesis that beta3 is equal to zero an alternative 00:13:48.000 --> 00:13:54.000 hypothesis that is not equal to zero and if our p-value for that two-tailed 00:13:54.000 --> 00:14:01.000 hypothesis test was less than 0.05 then we may conclude that there is significant effect modification 00:14:01.000 --> 00:14:06.000 that the effect of our exposure or treatment on the outcome 00:14:06.000 --> 00:14:12.000 depends upon the level of this covariate x 00:14:12.000 --> 00:14:18.000 having established our model with the interaction term let's consider the interpretation of the regression 00:14:18.000 --> 00:14:27.000 coefficients so beta1 is interpreted as the effect of r on y when x is equal to zero 00:14:27.000 --> 00:14:34.000 similarly beta2 represents the effect of x on y when r is equal to zero 00:14:34.000 --> 00:14:41.000 now in effect b to one and b to two are no longer that useful unless the zero values of those respective predictors 00:14:41.000 --> 00:14:46.000 are of particular interest these are what we refer to as the main effects here 00:14:46.000 --> 00:14:52.000 beta 3 is interpreted as the difference of the effect of r on y depending on the 00:14:52.000 --> 00:14:59.000 levels of the x variable if our hypothesis test for beta3 concludes that it does significantly 00:14:59.000 --> 00:15:05.000 differ from zero that means that typically both r and x are associated with y 00:15:05.000 --> 00:15:11.000 that the effect of r and y will depend on x and vice versa 00:15:11.000 --> 00:15:20.000 and so the r by x interaction is interpreted as the difference of the effect of r as x goes from zero to one 00:15:20.000 --> 00:15:27.000 or for any one unit increase in our covariate our moderator variable 00:15:27.000 --> 00:15:32.000 let's apply that to the example we saw earlier with the her2 gene expression in 00:15:32.000 --> 00:15:39.000 this example our outcome might be some continuous symptom score our treatments are is herceptin or 00:15:39.000 --> 00:15:46.000 placebo and our moderator variable is the presence of the her2g yes or no 00:15:46.000 --> 00:15:53.000 so we may fit the linear regression model that we specified earlier and the interpretation of the coefficients is 00:15:53.000 --> 00:16:02.000 that beta 1 is the effect of herceptin on the outcome in the absence of the her2 gene ie when x is equal to zero 00:16:02.000 --> 00:16:07.000 beta2 is the effect of the her2g non-outcome in the placebo group i.e 00:16:07.000 --> 00:16:14.000 when r is equal to zero and beta3 is the difference in the effect of percepting on outcome in the 00:16:14.000 --> 00:16:23.000 subgroup with the her2 gene present and the subgroup without the her2 gene present 00:16:23.000 --> 00:16:28.000 to summarize what we've learned about effect modification or moderation if the treatment effect is thought to 00:16:28.000 --> 00:16:33.000 vary with subgroups or some moderators then this should be specified in advance 00:16:33.000 --> 00:16:40.000 in order to avoid accusations of cherry picking or alternatively incorporated into the design of the study itself 00:16:40.000 --> 00:16:47.000 the analysis should typically proceed in the following order so we would add the interaction term between the moderator 00:16:47.000 --> 00:16:53.000 and the treatment to the model and then we may look at explanatory analysis within those relevant subgroups 00:16:53.000 --> 00:17:00.000 if we find a significant interaction effect if one is doing this then we should report the results of all the subgroups 00:17:00.000 --> 00:17:06.000 and the interactions which have been carried out so that we're not just presenting those which have got significant or 00:17:06.000 --> 00:17:13.000 interesting findings also know that the statistical power will be lowered to detect an interaction 00:17:13.000 --> 00:17:21.000 effect than for the main effect and so wouldn't conclude that absence of evidence is not evidence of absence 00:17:21.000 --> 00:17:27.000 that a non-significant beta 3 does not mean there's no effect modification it may be that the difference is small and 00:17:27.000 --> 00:17:33.000 we simply didn't have a large enough sample size and therefore enough statistical power to detect that small 00:17:33.000 --> 00:17:42.000 effect 00:17:42.000 --> 00:17:48.000 welcome back to the mlti module 10. in this session we're going to look at 00:17:48.000 --> 00:18:01.000 quantitative analytic techniques for mediation and components 00:18:01.000 --> 00:18:09.000 let's first consider the mediation of effects via post treatment variables 00:18:09.000 --> 00:18:16.000 so what do we mean by mediation hyman in a paper in 1955 described this 00:18:16.000 --> 00:18:23.000 as when the analyst interprets a relationship he determines the process through which the assumed cause is 00:18:23.000 --> 00:18:28.000 related to what we take to be its effect how did the result come about what are 00:18:28.000 --> 00:18:34.000 the links between the two variables described in formal terms the interpretation of a statistical 00:18:34.000 --> 00:18:40.000 relationship between two variables involves the introduction of further variables and an examination of the 00:18:40.000 --> 00:18:47.000 resulting interrelationships between all the factors so this is similar to the diagrams we 00:18:47.000 --> 00:18:53.000 saw in the video in part one where we linked r and y our two variables and said what 00:18:53.000 --> 00:19:00.000 are the underlying causes or explanations for this association 00:19:00 .000--> 00:19:06.000 david kenny on his website refers to this as one reason for testing mediation is trying 00:19:06.000 --> 00:19:14.000 to understand the mechanism through which the causal variable affects the outcome so in other words by mediation 00:19:14.000 --> 00:19:22.000 we're thinking about a mechanisms evaluation 00:19:22.000 --> 00:19:27.000 in their 1986 paper bound and kenny defined mediation as the generative 00:19:27.000 --> 00:19:34.000 mechanism through which the focal independent variable is able to influence the dependent variable of interest 00:19:34.000 --> 00:19:40.000 this gives rise to a definition of a mediator this is a variable which occurs in the causal pathway between an 00:19:40.000 --> 00:19:46.000 exposure and an outcome variable it causes variation in the outcome and 00:19:46.000 --> 00:19:51.000 itself is caused to vary by the exposure variable so note that this implies the kind of 00:19:51.000 --> 00:19:57.000 temporal relationship that r occurs before m and the m occurs before 00:19:57.000 --> 00:20:05.000 y so the exposure changes the mediator and the mediator changes the outcome 00:20:05.000 --> 00:20:12.000 if we were to represent this mediated effect pictorially then we may have the diagram here which represents complete 00:20:12.000 --> 00:20:20.000 mediation so in this diagram we have an effective r on m and an effective m on y 00:20:20.000 --> 00:20:26.000 and note here that m is the only mechanism by which r can bring about a 00:20:26.000 --> 00:20:31.000 change in y 00:20:31.000 --> 00:20:37.000 that might be an unrealistic assumption there may be other effects through which 00:20:37.000 --> 00:20:44.000 r can change why they don't act through a particular mediator and that's what leads us to what's often referred to as 00:20:44.000 --> 00:20:53.000 the mediation triangle so we have partial mediation at the effect of r on y to a mediator variable 00:20:53.000 --> 00:20:59.000 m and we're interested in estimating all three of the pathways represented by the 00:20:59.000 --> 00:21:05.000 arrows between the boxes in this picture 00:21:05.000 --> 00:21:11.000 so why would we want to assess mediation in any of our studies the first reason might be to develop or 00:21:11.000 --> 00:21:17.000 confirm a mechanistic theory of how a treatment is working how it benefits an 00:21:17.000 --> 00:21:23.000 outcome the second might be to explain why a study or trial has produced a negative 00:21:23.000 --> 00:21:28.000 finding is it because the treatment failed to change the hypothesized mediator or is 00:21:28.000 --> 00:21:34.000 it that the mediator failed to influence the outcome in the way that theory had suggested 00:21:34.000 --> 00:21:40.000 it could be that the effects actually counter balance other harmful effects and so we see that there's no 00:21:40.000 --> 00:21:46.000 overall effect third reason might be because we want to improve the treatment by identifying 00:21:46.000 --> 00:21:52.000 better target variables in earlier phase trials we're generally 00:21:52.000 --> 00:21:57.000 concerned with a more exploratory analysis to maybe identify which of the 00:21:57.000 --> 00:22:04.000 putative mediators are present from a larger set of pool of potential variables and that this might 00:22:04.000 --> 00:22:11.000 be considered more hypothesis generating and that any hypothesis would then be confirmed in a new trial or a new 00:22:11.000 --> 00:22:17.000 independent sample so later phase trials what we might consider phase three trials are 00:22:17.000 --> 00:22:23.000 generally then concerned with confirming and or testing the existence of a 00:22:23.000 --> 00:22:28.000 mediation hypothesis let's give you a couple of more concrete 00:22:28.000 --> 00:22:35.000 examples of what we mean by target mechanisms or target intermediate variables so if a treatment targets a 00:22:35.000 --> 00:22:41.000 particular intermediate variable in order to bring about a change in a clinical outcome such as symptoms for 00:22:41.000 --> 00:22:46.000 example in cognitive behavior therapy or talking therapies 00:22:46.000 --> 00:22:51.000 often the target is a person's thinking or their beliefs in order to bring about 00:22:51.000 --> 00:22:58.000 a change in their symptoms a more classic example is that beta blockers 00:22:58.000 --> 00:23:04.000 help to control blood pressure and particularly variation in blood pressure and that brings about a reduction in 00:23:04.000 --> 00:23:11.000 stroke risk and the idea is that an explanatory analysis of a trial or study would seek 00:23:11.000 --> 00:23:18.000 to establish that this is actually the mechanism through which that effect is happening so to assess the mediated 00:23:18.000 --> 00:23:24.000 pathway in order to do this we need to consider 00:23:24.000 --> 00:23:31.000 the statistical models that we might consider what's represented here is the single mediator model so in the top 00:23:31.000 --> 00:23:38.000 diagram we have the effect of r on y which is our total effect and we 00:23:38.000 --> 00:23:43.000 represent this by some coefficient c in the second diagram we have our 00:23:43.000 --> 00:23:49.000 mediation triangle so we have the effect of r on m represented by a 00:23:49.000 --> 00:23:55.000 we have the effect of m on y represented by b and we have what's called the direct 00:23:55.000 --> 00:24:03.000 effect the effect of r on y which doesn't go through m which is represented by here the c prime 00:24:03.000 --> 00:24:09.000 and in the box we have a reminder of what each of these variables represents 00:24:09.000 --> 00:24:15.000 u in this picture represents some measured confounders and i'll talk more about the role that these play a little 00:24:15.000 --> 00:24:22.000 bit later so we refer to this top effect here the c as being the total 00:24:22.000 --> 00:24:29.000 effect we refer to c prime the effect of r1y in the presence of the mediator as being a 00:24:29.000 --> 00:24:34.000 direct effect and we refer to the effect of r1y that 00:24:34.000 --> 00:24:39.000 goes through m as being the indirect or the mediated effect 00:24:39.000 --> 00:24:45.000 so the aim here is to decompose these effects into direct and indirect effects 00:24:45.000 --> 00:24:52.000 we want to partition the total effect of an exposure on an outcome into that bit of the effect which 00:24:52.000 --> 00:24:57.000 operates via this putative mediator and that's what we refer to as the indirect 00:24:57.000 --> 00:25:03.000 effect and the bit that doesn't go through that mediator and that's what referred to as the direct effect 00:25:03.000 --> 00:25:10.000 and it's important to know that the definition of a direct effect includes any effects via other mediating 00:25:10.000 --> 00:25:17.000 variables which are not included in that model so the interpretation of this direct effect is always relative to the 00:25:17.000 --> 00:25:23.000 variable whose mediating effect is being modeled so a more effective term might be the 00:25:23.000 --> 00:25:29.000 residual direct effect typically the way that we would estimate 00:25:29.000 --> 00:25:35.000 these is by using what's known as the positive coefficient method so if we have a continuous mediator and a 00:25:35.000 --> 00:25:40.000 continuous outcome we may fit three linear regression models 00:25:40.000 --> 00:25:47.000 the first is a model for the total effect so we fit a model for our outcome 00:25:47.000 --> 00:25:53.000 y where we include as a covariate our randomization or exposure 00:25:53.000 --> 00:25:59.000 variable r and we estimate our parameter c that gives us our estimate of the 00:25:59.000 --> 00:26:06.000 total effect in a randomized trial context this may be equivalent to an intention to treat 00:26:06.000 --> 00:26:12.000 analysis the second model is a model where the mediator variable is the dependent 00:26:12.000 --> 00:26:19.000 variable and we include the randomization variable as a predictor and the coefficient of the randomization 00:26:19.000 --> 00:26:25.000 variable is a and that corresponds to this arrow between r and m this a 00:26:25.000 --> 00:26:32.000 pathway here the third model is a model for the outcome again where we include both the 00:26:32.000 --> 00:26:38.000 randomization or exposure indicator and the mediating variable in the same model 00:26:38.000 --> 00:26:44.000 and this gives us estimates of both the b path the effect of m on y 00:26:44.000 --> 00:26:51.000 and the c prime path the effect of r on y in the presence of m 00:26:51.000 --> 00:26:56.000 and from these we can get our estimates of a b c prime and c 00:26:56.000 --> 00:27:01.000 and so we can estimate the indirect or mediated effect as the product of the 00:27:01.000 --> 00:27:08.000 coefficients of the relevant pathways that is the effect of r1y through m is a 00:27:08.000 --> 00:27:13.000 times b now we know that our decomposition means 00:27:13.000 --> 00:27:19.000 that the total effect c is equal to a times b plus c prime and 00:27:19.000 --> 00:27:25.000 that means that we can rearrange this equation and get another estimate of our indirect effect as 00:27:25.000 --> 00:27:31.000 a times b is equal to c minus c prime that is our total effect minus our 00:27:31.000 --> 00:27:36.000 estimate of the direct effect 00:27:36.000 --> 00:27:42.000 so the top of this slide just picks up on that point and this is sometimes what's referred to as the difference in 00:27:42.000 --> 00:27:48.000 coefficients approach because we're no longer calculating the indirect vectors the product of a times 00:27:48.000 --> 00:27:54.000 b but instead is the difference in these coefficients c and c prime 00:27:54.000 --> 00:27:59.000 one advantage of this is that it only actually requires fitting two of those three models it requires fitting a model 00:27:59.000 --> 00:28:06.000 for the outcome for the total effect and a model for the outcome for the direct effect and the difference between 00:28:06.000 --> 00:28:12.000 these two coefficients is taken as representing the indirect effect this is often an approach used in 00:28:12.000 --> 00:28:18.000 epidemiology because it involves just fitting models for the outcome rather than for the mediator which may be more 00:28:18.000 --> 00:28:24.000 familiar in fact for the rest of this session i'm just going to proceed with estimating a 00:28:24.000 --> 00:28:31.000 times b which is perhaps more common in the randomized trial context but all of the thinking in the methods apply 00:28:31.000 --> 00:28:37.000 similarly regardless of which of the methods you use now that we've defined the relevant 00:28:37.000 --> 00:28:42.000 coefficients let's go back to consider the difference between complete and partial mediation so we know that a 00:28:42.000 --> 00:28:48.000 mediator can account for either all or part of this total effect 00:28:48.000 --> 00:28:53.000 complete mediation would occur if the mediator accounts for all of that total effect 00:28:53.000 --> 00:29:00.000 and you would see that this is the case if the direct effect the path c prime drops to an estimate of almost zero and 00:29:00.000 --> 00:29:07.000 is statistically insignificant after controlling for the mediator variable in the model for the outcome 00:29:07.000 --> 00:29:15.000 partial mediation would be said to occur if the mediating variable accounts for some but not all of that total effect so 00:29:15.000 --> 00:29:20.000 in this case the path c prime will be smaller in magnitude than the total 00:29:20.000 --> 00:29:25.000 effect or weaker as i've labeled it here but it's not fully eliminated after 00:29:25.000 --> 00:29:31.000 controlling for the mediator variable so it may still be statistically significant but it's certainly its 00:29:31.000 --> 00:29:37.000 magnitude would be somewhat smaller note that it's also generally 00:29:37.000 --> 00:29:44.000 sensible to consider mediation when both the indirect effects and the direct effect have the same sign 00:29:44.000 --> 00:29:49.000 i.e both the positive or both negative if they act in different directions 00:29:49.000 --> 00:29:54.000 then each of those two pathways may be statistically significant but that some of those 00:29:54.000 --> 00:30:01.000 may contribute to a total effect c which is not significant and this is what's referred to as inconsistent mediation or 00:30:01.000 --> 00:30:08.000 suppression within the literature as i stated earlier the differencing 00:30:08.000 --> 00:30:14.000 coefficient method is popular in epidemiology because it only involves fitting models for this clinical outcome 00:30:14.000 --> 00:30:20.000 however in trials the reason we may be more interested in the product of coefficients approach is because we 00:30:20.000 --> 00:30:27.000 actually want to see what the treatment effect on that intermediate variable m is so we want to know the size and the 00:30:27.000 --> 00:30:32.000 significance of the a pathway and in our work we refer to this a 00:30:32.000 --> 00:30:38.000 pathway as being the target effect it's the effect on our target intermediate mechanism 00:30:38.000 --> 00:30:44.000 regardless of your estimation approach it's somewhat essential to show that the treatment has shifted the mediator for 00:30:44.000 --> 00:30:50.000 mediation through this variable to occur so that means that if there is no significance 00:30:50.000 --> 00:30:57.000 a pathway that there's no difference between your exposure levels on that mediating variable then that is not a 00:30:57.000 --> 00:31:04.000 mediator of the relationship between your exposure and the outcome 00:31:04.000 --> 00:31:10.000 what we've considered so far is how to estimate the size of the indirect effect 00:31:10.000 --> 00:31:17.000 multiplying the a and the b paths together in linear models but to make inference we need to know 00:31:17.000 --> 00:31:23.000 the standard error of that product so so will divide a formula for estimating this 00:31:23.000 --> 00:31:29.000 asymptotic standard error where it only requires both the estimates of a and b and the standard errors of a and b 00:31:29.000 --> 00:31:37.000 themselves and symmetric confidence intervals using this rely on asymptotic normality but 00:31:37.000 --> 00:31:44.000 because we're multiplying two coefficients together that asymptotic normalities are likely to hold and so 00:31:44.000 --> 00:31:53.000 these days we would prefer to use bootstrapping as a way of estimating our standard error 00:31:53.000 --> 00:31:59.000 so to get a bootstrapped confidence interval for the indirect effect we often use bootstrapping 00:31:59.000 --> 00:32:05.000 this requires taking a large number of samples with replacement from the original data set 00:32:05.000 --> 00:32:12.000 in each of those individual samples we then estimate our indirect effect a times b 00:32:12.000 --> 00:32:19.000 we then plot the distribution of those um estimates from each of the samples 00:32:19.000 --> 00:32:27.000 and this gives us a non-parametric distribution of the indirect effect and for a given level of significance we 00:32:27.000 --> 00:32:33.000 can simply calculate the percentile bootstrap limits by finding 00:32:33.000 --> 00:32:40.000 the 2.5 and the 97.5 limits of that non-parametric 00:32:40.000 --> 00:32:46.000 distribution across the bootstrap samples and importantly to note if one's doing 00:32:46.000 --> 00:32:52.000 this is that because this is a random sampling procedure from the original data set one needs to set the same seed 00:32:52.000 --> 00:32:58.000 value so that you can replicate the results if you need to go back to them 00:32:58.000 --> 00:33:04.000 now i'd like to consider one of the major challenges in estimating the mediation effects we're illustrating 00:33:04.000 --> 00:33:11.000 this using a randomized trial so on the left hand side we have random allocation we have our mediator and our outcome 00:33:11.000 --> 00:33:18.000 they represent the mediation triangle and we're trying to estimate the pathways between these three variables 00:33:18.000 --> 00:33:24.000 now in a trial we as investigators have control over the random allocation we're 00:33:24.000 --> 00:33:32.000 assigning individuals to different randomized groups however our mediator has to occur after 00:33:32.000 --> 00:33:37.000 randomization and prior to the outcome and that means that this is the mediator 00:33:37.000 --> 00:33:44.000 is a post-randomization variable in of itself what that means is that it's not under 00:33:44.000 --> 00:33:50.000 the direct control of the investigators typically an observation that we make on the individuals 00:33:50.000 --> 00:33:56.000 and that leads to a challenge that both the mediator and the outcome are post-randomization measures which 00:33:56.000 --> 00:34:02.000 themselves may be affected by other factors not under the control of the investigators in this case they're 00:34:02.000 --> 00:34:07.000 represented by this you these unmeasured confounding terms 00:34:07.000 --> 00:34:13.000 if we know there are factors which might influence for example both blood pressure and stroke risk or someone's 00:34:13.000 --> 00:34:20.000 thinking style and their symptoms then we can measure those and we can account for them as covariates in our 00:34:20.000 --> 00:34:26.000 linear models that we saw previously the challenge comes that we can never rule out that there are unmeasured 00:34:26.000 --> 00:34:32.000 confounders between our mediator and our outcome that may be accounting for 00:34:32.000 --> 00:34:40.000 any association that we see you'll recognize this picture is one of the ones that we saw when i first introduced 00:34:40.000 --> 00:34:46.000 one of the explanations for why there may be an association between two variables 00:34:46.000 --> 00:34:52.000 so what we're wanting to do is estimate unbiasedly the pathway from the mediator to the outcome and the problem is that 00:34:52.000 --> 00:34:58.000 in the presence of these unmeasured confounders we can't get an unbiased estimate of this pathway 00:34:58.000 --> 00:35:03.000 and in fact because this opens up a an association between 00:35:03.000 --> 00:35:09.000 the mediator and the outcome which is not explained as a direct path 00:35:09.000 --> 00:35:16.000 in fact we can also not get a unbiased estimate of the effect of random allocation on outcome that is this 00:35:16.000 --> 00:35:22.000 pathway because we estimate this in the same model for the outcome and in fact what we're doing by 00:35:22.000 --> 00:35:29.000 conditioning on this variable here in the literature this is known as conditioning on a collider we open up an 00:35:29.000 --> 00:35:36.000 association between random allocation and outcome that acts through this unmeasured confounder 00:35:36.000 --> 00:35:41.000 and so we don't we fail to get a an accurate unbiased estimate of this 00:35:41.000 --> 00:35:48.000 pathway and a number assessment of this pathway and the whole thing falls down 00:35:48.000 --> 00:35:54.000 i'm just going to show you this in action using a very simple example using simulated data so i've made up some data 00:35:54.000 --> 00:36:00.000 where we have a continuous mediation outcome all the paths in this diagram are represented by 00:36:00.000 --> 00:36:07.000 a value of 0.25 and we have a covariate here which we know is influencing both m 00:36:07.000 --> 00:36:13.000 and y and the data that i've made up and i'm going to fit models that include and exclude that variable to see the impact 00:36:13.000 --> 00:36:18.000 of that so here's just some standard output from 00:36:18.000 --> 00:36:25.000 a package we have 2 000 observations in our data set this is our first linear model so we fit 00:36:25.000 --> 00:36:31.000 a linear regression of the outcome on r exactly as i described previously and we 00:36:31.000 --> 00:36:36.000 get an estimate of the total effect of 0.313 which is what we expect in our 00:36:36.000 --> 00:36:41.000 data if we figure the second linear model 00:36:41.000 --> 00:36:48.000 which is a model for the outcome conditional on r so now we do a linear regression of m 00:36:48.000 --> 00:36:54.000 on r then we get an estimate of the coefficient of 0.25 00:36:54.000 --> 00:37:01.000 and again that's what we set this to be in the data so we're obtaining an unbiased estimate of the a pathway the 00:37:01.000 --> 00:37:08.000 effect of r on m 00:37:08.000 --> 00:37:15.000 now if we fit a model for the outcome conditional on the mediator and the exposure so we do a linear 00:37:15.000 --> 00:37:20.000 regression of y on m and r we know that there is an unmeasured 00:37:20.000 --> 00:37:25.000 confounder that we're not accounting for in this analysis model that is actually present 00:37:25.000 --> 00:37:31.000 in the data and what you can see is that we get biased estimates of both the m to y 00:37:31.000 --> 00:37:38.000 relationship and the r to y relationship exactly as i described a couple of slides ago 00:37:38.000 --> 00:37:45.000 so we overestimate the effect of m on y and underestimate the effect of r on y 00:37:45.000 --> 00:37:51.000 both of these coefficients should be approximately 0.25 this would mean that we would 00:37:51.000 --> 00:37:56.000 overestimate the indirect effect because we're saying that this b pathway is far 00:37:56.000 --> 00:38:02.000 stronger than it is in practice and so we'd over over estimate the size of the 00:38:02.000 --> 00:38:13.000 indirect effect and conclude that there's a mechanism that is stronger than what might actually be present 00:38:13.000 --> 00:38:18.000 and in fact the only way we can gain unbiased estimates and recover the true 00:38:18.000 --> 00:38:25.000 values that we know were there when we generated the data is by including the covariate that we 00:38:25.000 --> 00:38:30.000 use in the generating model so now we recover the correct estimates of 0.25 00:38:30.000 --> 00:38:38.000 for all of the coefficients and of course the challenge in practice in real data is we never know when we've 00:38:38.000 --> 00:38:43.000 collected all of those covariates and confound us or not so we can never rule out 00:38:43.000 --> 00:38:56.000 that there's an unmeasured confounder which may be accounting for an association that we see in our data 00:38:56.000 --> 00:39:03.000 here's just an example of how one can go further and gain some influence for the indirect effects themselves so i talked 00:39:03.000 --> 00:39:08.000 previously about how sobel had introduced an asymptotic standard error 00:39:08.000 --> 00:39:14.000 for the indirect effect and here in this output we can see our estimate for the a 00:39:14.000 --> 00:39:19.000 coefficient the b coefficient an estimate of the indirect effect the 00:39:19.000 --> 00:39:25.000 direct effect and the total effect so these are all terms and concepts that should now be familiar and map onto that 00:39:25.000 --> 00:39:30.000 mediation triangle that we've been describing and 00:39:30.000 --> 00:39:37.000 the proportion mediated is often reported this is the ratio of the indirect effect of the total effect so 00:39:37.000 --> 00:39:44.000 it is expressed as how much of the total effect is acting through the particular mediator investigated in this case that 00:39:44.000 --> 00:39:49.000 estimate is about 19 00:39:49.000 --> 00:39:55.000 this example just shows how one can get inference for the indirect effects using the bootstrap approach which is the 00:39:55.000 --> 00:40:03.000 recommended approach that i highlighted earlier so if we run a bootstrap replication with 2000 applications 00:40:03.000 --> 00:40:11.000 and these are the results within status statistical software package but all packages can run bootstrap commands we 00:40:11.000 --> 00:40:17.000 see that our estimates of the indirect effects and the direct effect are reported here and the coefficients 00:40:17.000 --> 00:40:24.000 themselves are exactly the same as we saw on the previous slide we now get an estimated bootstrap standard error and 00:40:24.000 --> 00:40:31.000 from this we would probably report the percentile confidence intervals as a measure of the direct and indirect 00:40:31.000 --> 00:40:37.000 effect and of course what one is looking for is that this indirect effect is 00:40:37.000 --> 00:40:44.000 um statistically significant or the confidence interval doesn't cross the zero threshold in this case because of 00:40:44.000 --> 00:40:50.000 the way we generated the data we know that there is an indirect effect corresponding to an effect size of about 00:40:50.000 --> 00:40:57.000 0.06 and that's exactly what we've recovered in this example 00:40:57.000 --> 00:41:02.000 so we've illustrated how to look at mediation in a single mediator context 00:41:02.000 --> 00:41:08.000 an obvious extension that people want to do is to look at potentially two mediators in the same model and again 00:41:08.000 --> 00:41:13.000 that can be done straightforwardly with an extension to what we've done before so this is a diagram we've seen 00:41:13.000 --> 00:41:19.000 previously but now we've added an additional mediator m2 here and so now 00:41:19.000 --> 00:41:24.000 there are two indirect effects there's an indirect effect that acts 2 m1 and 00:41:24.000 --> 00:41:32.000 there's an indirect effect that acts through m2 and we estimate the effect of the exposure of randomization on our second 00:41:32.000 --> 00:41:39.000 mediator as being this path a2 and the effect of the mediator on the outcome has been this path b2 00:41:39.000 --> 00:41:45.000 and so our indirect effect through the second mediator is simply a2 times b2 00:41:45.000 --> 00:41:51.000 using the product of coefficients approach in this picture this decomposition of 00:41:51.000 --> 00:41:56.000 the total effect into the indirect and direct effects still holds as you'll see 00:41:56.000 --> 00:42:03.000 here it's the sum of each of the separate indirect effects plus the direct effect 00:42:03.000 --> 00:42:10.000 and the reason that this holds is that we've assumed that there's no relationship between these two mediators and often 00:42:10.000 --> 00:42:16.000 this is an assumption used to simplify the analysis and one needs to be aware of whether this is biologically 00:42:16.000 --> 00:42:22.000 plausible within your own example and data 00:42:22.000 --> 00:42:27.000 so with this artificial data i've shown how it can be fairly straightforward to estimate 00:42:27.000 --> 00:42:33.000 mediation effects using effectively three linear regression models 00:42:33.000 --> 00:42:38.000 however embedded within that are a number of assumptions and so these pose as 00:42:38.000 --> 00:42:44.000 challenges for establishing mediation the first is that we've highlighted the possible confounding effect 00:42:44.000 --> 00:42:50.000 of mediator on outcome if there are unmeasured confounders in that 00:42:50.000 --> 00:42:56.000 data that are acting to drive that association that we're not taking into account then we will potentially 00:42:56.000 --> 00:43:02.000 get biased estimates of the indirect effect actually we see the same thing happens 00:43:02.000 --> 00:43:09.000 if our mediator variable is measured with error so if we're trying to collect for example blood pressure as our mediator 00:43:09.000 --> 00:43:14.000 or some measure of tumor activity then we have to know that we're collecting 00:43:14.000 --> 00:43:20.000 reliable and valid measures of that because any measurement error in the mediator when it's controlled for the 00:43:20.000 --> 00:43:27.000 covariate in the model for the outcome will then induce bias in the coefficients and it has the same impact 00:43:27.000 --> 00:43:32.000 that confounding does we've seen that the possibility of multiple mediators that are either 00:43:32.000 --> 00:43:37.000 working with power there or sequentially will massively complicate the definition of in 00:43:37.000 --> 00:43:44.000 the indirect effects because there are multiple indirect effects acting through each of the possible pathways or arrows 00:43:44.000 --> 00:43:50.000 and in general we need to be aware of the data structure so we may have repeated or serial assessments of both 00:43:50.000 --> 00:43:56.000 the mediator and the outcome or we may have in in the case of oncology see with assessments of the mediator and a 00:43:56.000 --> 00:44:02.000 survival time for the outcome and that becomes much more challenging than the simple linear regression models 00:44:02.000 --> 00:44:09.000 that i've illustrated here and i'd point towards the further reading and some of the references for further information 00:44:09.000 --> 00:44:15.000 about these in part one of this session we talked about moderation and here i'm showing 00:44:15.000 --> 00:44:22.000 how we can combine our thinking of mediation and moderation together in the first diagram we have what's called 00:44:22.000 --> 00:44:28.000 mediated moderation so if we find an interaction between r and x that 00:44:28.000 --> 00:44:34.000 influences y we may assume that the entire effect of that interaction is through our mediator m 00:44:34.000 --> 00:44:39.000 so that our r by x interaction represented by this red line here is 00:44:39.000 --> 00:44:44.000 acting through our mediator on the outcome 00:44:44.000 --> 00:44:50.000 contrast this with moderated mediation and this is where the effect of a mediator 00:44:50.000 --> 00:44:56.000 on the outcome varies depending on the level of our moderator x so here the red 00:44:56.000 --> 00:45:01.000 arrow is now pointing at the m to y pathway indicating that it's the effect 00:45:01.000 --> 00:45:08.000 of m on y which varies across the level of x 00:45:08.000 --> 00:45:13.000 throughout your course you have been introduced to logic models and encouraged to produce these for how your 00:45:13.000 --> 00:45:20.000 interventions may influence outcomes and what i'm going to illustrate here is an example of a logic model and how this 00:45:20.000 --> 00:45:25.000 maps onto the thinking around mechanisms and mediation that we've discussed 00:45:25.000 --> 00:45:31.000 so we have some inputs and activities leading to our short-term 00:45:31.000 --> 00:45:36.000 outcomes medium-term and long-term outcomes 00:45:36.000 --> 00:45:42.000 and if we put this in the context of the variables we've defined we see that our 00:45:42.000 --> 00:45:49.000 activities and outputs are what we might consider the exposures that we've been talking about our short-term and 00:45:49.000 --> 00:45:56.000 medium-term outcomes might be what we consider our mediators and our long-term outcome is the clinical outcome that we 00:45:56.000 --> 00:46:01.000 may express so these three variables would form what we've considered as our 00:46:01.000 --> 00:46:08.000 mediation mechanisms at the bottom we have our contextual variables in this example and they're 00:46:08.000 --> 00:46:15.000 what we might refer to as moderators so that each stage of our logic model is influenced by these different contexts 00:46:15.000 --> 00:46:22.000 and that's an example of moderation that's saying that the context may influence the way that each of these 00:46:22.000 --> 00:46:29.000 pathways work and that might lead us to either mediated moderation or moderated 00:46:29.000 --> 00:46:34.000 mediation so if one builds a logic model and is able to measure each of the components 00:46:34.000 --> 00:46:43.000 of that you can then fit those measures into our statistical models that we've been discussing today 00:46:43.000 --> 00:46:50.000 i focused on using regression models for mediation analysis and here is a summary of all of the key assumptions which are 00:46:50.000 --> 00:46:55.000 needed in order to validate the statistical methods and ensure that you 00:46:55.000 --> 00:47:01.000 get unbiased estimates by using those regression models and i would recommend you to read 00:47:01.000 --> 00:47:06.000 through these in your time what i'd like to finish with is an 00:47:06.000 --> 00:47:14.000 extension to multi-level models for mediation analysis so when we have multi-level data the 00:47:14.000 --> 00:47:19.000 variables themselves can come from different levels of the model generally in a multi-level modeling 00:47:19.000 --> 00:47:26.000 approach the outcome is always measured at level one that is at the lowest level in the data but depending on the data 00:47:26.000 --> 00:47:31.000 the independent variable or the mediator could be either level one or level two 00:47:31.000 --> 00:47:37.000 variables and as a general rule of thumb an independent variable can be mediated by 00:47:37.000 --> 00:47:43.000 a variable at the same level or by a variable a level lower and so a level two 00:47:43.000 --> 00:47:48.000 exposure can be mediated by a level two or a level one variable but a level one 00:47:48.000 --> 00:47:55.000 exposure can only be mediated by another level one variable logically a level one predictor can't 00:47:55.000 --> 00:48:02.000 influence a level two mediator that is something measured on the individual can't then drive something measured at 00:48:02.000 --> 00:48:09.000 level two the healthcare professional or the or the cluster 00:48:09.000 --> 00:48:16.000 so here's an example of multi-level mediation where the data is split into two levels level one the lowest level of 00:48:16.000 --> 00:48:22.000 observation and level two the clustered level and within the data and we may 00:48:22.000 --> 00:48:28.000 have two what's this diagram refers to as antecedent variables or exposure variables as we've termed them 00:48:28.000 --> 00:48:35.000 and at the lower level this is referred to as xij our mediator variable is also measured 00:48:35.000 --> 00:48:41.000 at level one this is denoted m i j and our dependent variable y i j 00:48:41.000 --> 00:48:49.000 and what is referred to as the one one one model illustrates the levels at which each of the exposure mediator and 00:48:49.000 --> 00:48:56.000 outcomes are measured so when they're all at level one we can estimate our a pathway and our b pathway on the level 00:48:56.000 --> 00:49:03.000 one data and our c prime as the direct effect as we defined previously 00:49:03.000 --> 00:49:10.000 if our exposure variable is something occurring at level 2 then this would be denoted just by xj so it doesn't have 00:49:10.000 --> 00:49:17.000 the the i subscript and this is referred to as a 2 1 one model and again we estimate our a 00:49:17.000 --> 00:49:24.000 pathway in our scene c prime pathway as the effects of the exposure on the mediator and the outcome respectively 00:49:24.000 --> 00:49:30.000 from this level two to the level one outcomes 00:49:30.000 --> 00:49:36.000 we can refer to the models as being either one one one two one one or two two one depending on the various levels 00:49:36.000 --> 00:49:42.000 of the exposure the mediating the outcome which are being analyzed an example of fitting a one-on-one model 00:49:42.000 --> 00:49:49.000 in multi-level data would be that each of our outcomes is measured at level one so y i 00:49:49.000 --> 00:49:55.000 j and mij and we introduce random effects to capture the clustering which is 00:49:55.000 --> 00:50:02.000 present in the outcomes at level two so we may have data on individuals which is captured within treatment centers or 00:50:02.000 --> 00:50:09.000 some hierarchy within the data and we need to count for that clustering by introducing random intercepts at level 00:50:09.000 --> 00:50:17.000 two and respectively these are represented by uj c u j m and u j y and this is a 00:50:17.000 --> 00:50:24.000 standard multi-level or random effects modeling framework but the interpretation of our coefficients in 00:50:24.000 --> 00:50:29.000 terms of our total effect c our indirect effect a and b and our 00:50:29.000 --> 00:50:36.000 direct effect c prime are unchanged we've just accounted for the lack of independence in our data due to the 00:50:36.000 --> 00:50:42.000 clustering an example of a 2-1-1 model in 00:50:42.000 --> 00:50:48.000 multi-level data and in this example our exposure is now occurring at level 2 so we see in the 00:50:48.000 --> 00:50:54.000 models that this is now indexed by rj rather than by r i j 00:50:54.000 --> 00:51:00.000 and this is now a level two or cluster level exposure 00:51:00.000 --> 00:51:07.000 the other thing to note here is that both of these approaches estimate a single b pathway the effect of m on y 00:51:07.000 --> 00:51:16.000 and that that doesn't account for both between and within cluster variation 00:51:16.000 --> 00:51:22.000 this highlights one of the limitations of using multi-level model framework for multi-level mediation 00:51:22.000 --> 00:51:28.000 firstly that the multi-level approach doesn't allow for outcome variables which occur at level two and so there 00:51:28.000 --> 00:51:34.000 couldn't be for example a one one two model or a one two two model 00:51:34.000 --> 00:51:40.000 in both of the models that we considered the 2-1-1 and the 1-1-1 model there's a conflation of the between and within 00:51:40.000 --> 00:51:46.000 effects of m on y so there's only one b-slope which is being estimated whereas in fact that might vary across the 00:51:46.000 --> 00:51:52.000 levels and so an extension to this would be to use a multi-level structural equation 00:51:52.000 --> 00:51:58.000 modeling framework for investigating these to overcome these issues and this is what's presented in this very nice 00:51:58.000 --> 00:52:04.000 paper by preacher and colleagues from psychological methods that i would encourage people to read if they want to 00:52:04.000 --> 00:52:10.000 know more about this topic so to summarize this session the effect 00:52:10.000 --> 00:52:16.000 of moderation or effect modification can be assessed by including interaction effects 00:52:16.000 --> 00:52:22.000 in a randomized trial if the treatment doesn't affect the mediator then there can't be mediation through that variable 00:52:22.000 --> 00:52:28.000 and it's possibly the only aspect which can be tested unbiasedly the models for mediation should be the 00:52:28.000 --> 00:52:35.000 same as used for modeling the outcomes and i think this is a particularly important point when you've got multi-level interventions that require 00:52:35.000 --> 00:52:40.000 multi-level modeling to account for those different levels and the clustering in the data the mediation 00:52:40.000 --> 00:52:46.000 model should match those and a final cautionary warning that mediation analysis contains a lot of 00:52:46.000 --> 00:52:52.000 implicit assumptions but the validity of those estimates depends exactly on those assumptions holding so one should be 00:52:52.000 --> 00:52:57.000 aware and consider those so thank you very much for the invite to 00:52:57.000 --> 00:53:09.000 present and for your attention in following these videos