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