+ - 0:00:00
Notes for current slide
Notes for next slide

Linear mediation

Session 12

MATH 80667A: Experimental Design and Statistical Methods
HEC Montréal

1 / 28

Linear mediation

2 / 28

Reminder: three types of causal associations

Confounding Common cause Causal forks XZY

Causation Mediation Causal chain XZY

Collision Selection /
endogeneity
inverted fork XZY

3 / 28

Notation

Define

  • treatment of individual i as Xi, typically binary or categorical with Xi{0,,K} and
    • X=0 (control)
    • X=k (treatment) for k=1,,K
  • potential mediation given treatment x as Mi(x) and
  • potential outcome for treatment x and mediator m as Yi(x,m).
4 / 28

Sequential ignorability assumption

  1. Given pre-treatment covariates Z, potential outcomes for mediation and treatment are conditionally independent of treatment assignment. Yi(x,m),Mi(x)  XiZi=z
  2. Given pre-treatment covariates Z and observed treatment x, potential outcomes for the response are independent of mediation. Yi(x,m)  Mi(x)Xi=x,Zi=z
  • Assumption 1 holds under randomization of treatment.
  • Assumption 2 implies there is no confounder affecting both Yi,Mi.
5 / 28

Directed acyclic graph

Directed acyclic graph of the linear mediation model

Directed acyclic graph of the linear mediation model

Z are potential confounders. If we randomly allocate X (experiment), then all incoming arrows vanish and we have no confounder for X vs M or X vs Y.

6 / 28

Average directed effect

The ADE measures the flow along XY, disabling the pathway XMY by fixing the mediator value: it is ADE(x)=E[Yi(1,Mi(x))Yi(0,Mi(x))}

This measures the expected change in response when the experimental factor changes from treatment to control, while the mediator is set to a fixed value Mi(x) uniformly over the population. Fixing the mediator may or not be feasible experimentally.

If there is no interaction between the treatment and the mediator, then ADE(0)=ADE(1).

7 / 28

Average causal mediation effect

Also called indirect effect, obtained for a fixed intervention due to changing the values of the mediator to those it would take under the treatment and control group, respectively Mi(1) and Mi(0).

ACME(x)=E[Yi{x,Mi(1)}Yi{x,Mi(0)}]

If there is no interaction between the treatment and the mediator, then ACME(0)=ACME(1)

8 / 28

Total effect

Total effect: overall impact of X (both through M and directly)

TE=E[Ydo(X=1)]E[Ydo(X=0)]

XMY
plus
XY

The total effect is the average change in response if we randomize treatment assignment and consider the difference treatment vs control.

9 / 28

Total effect

The total effect measures the average overall impact of changes in outcome Y (both through M and directly) when experimentally manipulating X, TE=E[Yi{1,M(1)}]E[Yi{0,M(0)}],

  • The total effect is obtained as TE=ACME(X)+ADE(1X),X=0,1.
10 / 28

The values of the average causal mediation effect and the average direct effect are the same regardless of the treatment assignment x if there is no interaction.

Linear mediation model

Consider the following two linear regression models with a binary treatment X{0,1} and M binary or continuous:

Mβdmediator=cmβdintercept+αX+εmβerror termYβdresponse=cyβintercept+βXdirect effect+γM+εyβerror term

We assume that zero-mean error terms εm and εy are uncorrelated.

  • This is tied to the no confounders assumption.
11 / 28

Total effect decomposition

Plugging the first equation in the second, we get the marginal model for Y given treatment X E(YX=x)=(cy+γcm)intercept+(β+αγ)total effectx

In an experiment, we can obtain the total effect via the ANOVA model, with

Y=νaverage of control+τXtotal effect+εYerror termτ=E{Ydo(X=1)}E{Ydo(X=0)}

12 / 28

Product of coefficient method

In the linear mediation model of Baron and Kenny, the quantities of interest are

ACME(x)=E[Y{x,M(1)}Y{x,M(0)}]=αγADE(x)=E[Y{1,M(x)}Y{0,M(x)}]=βTE=E[Y{1,M(1)}Y{0,M(0)}]=β+αγ

13 / 28

Model assumptions

There are three main assumptions for this quantity to be a valid estimator of the causal mediation effect

  • the effect of treatment is linear.
  • there is no interaction between mediator M and treatment X.
  • the sequential ignorability assumption holds.
14 / 28

Sobel's test

Based on estimators of coefficients α^ and γ^, construct a test statistic S=α^γ^0se(α^γ^)

The coefficient and variance estimates can be extracted from the output of the regression model.

In large sample, SNormal(0,1), but this approximation may be poor in small samples.

15 / 28

Without interaction/accounting for confounders, αγ=τβ and with OLS we get exactly the same point estimates. The derivation of the variance is then relatively straightforward using the delta method.

Other test statistics

Sobel's test is not the only test. Alternative statistics are discussed in

MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological Methods, 7(1), 83–104. https://doi.org/10.1037/1082-989X.7.1.83

16 / 28

Alternative

An alternative to estimate p-value and the confidence interval is through the nonparametric bootstrap with the percentile method, popularized by Preacher and Hayes (2004)

Nonparametric bootstrap: repeat B times, say B=10 000

  1. sample n (same as original number of observations) tuples (Yi,Xi,Mi) from the database with replacement to obtain a new sample.
  2. recalculate estimates α^(b)γ^(b) for each bootstrap dataset
17 / 28

Bootstrap confidence intervals

Percentile-based method: for a equitailed 1α interval

  1. Run the nonparametric bootstrap and obtain estimates α^(b) and γ^(b) from the bth bootstrap sample.

  2. Compute the α/2 and 1α/2 empirical quantiles of {α^(b)γ^(b)}b=1B.

18 / 28

Boostrap two-sided p-value

Compute the sample proportion of bootstrap statistics that are larger/smaller than zero.

  1. Order bootstrap statistics S(1)S(B) and let S(0)=, S(M+1)=.
  2. Find M ( 0MB ) such that S(M)<0S(M+1) (if it exists)
  3. The p-value is

p=2min{M/B,1M/B}.

19 / 28

Note: many bootstraps! parametric, wild, sieve, block, etc. and many methods (basic, studentized, bias corrected and accelerated) for confidence intervals

Model assumptions

Same assumptions as analysis of variance and linear models

  • Linearity of the mean model
    • check via residual plots, fitted values y^ against m and x
  • Independent/uncorrelated errors
    • no confounding
  • Equal variance of errors in each model (homoskedasticity)
  • Large samples
20 / 28

Causal assumptions

Conclusions about mediation are valid only when causal assumptions hold.

Assuming that X is randomized, we need

  • Lack of interaction between X and M (moderated mediation)
  • Causal direction: MY
    • M must be an antecedent, i.e., must be measured before Y
  • Reliability of M (no measurement error)
  • No confounding between Y and M
  • Effect constant over individuals/levels
21 / 28

Sensitivity analysis

The no-unmeasured confounders assumption should be challenged.

Check the robustness of the conclusions by considering potential correlation between errors, as E(γ^)=γ+Cor(εm,εy)Va(εy)Va(εm)

  • We vary ρ=Cor(εm,εy) to assess the sensitivity to confounding.
  • The medsens function in the R package mediation implements the diagnostic of Imai, Keele and Yamamoto (2010) for the linear mediation model.
22 / 28

Defaults of linear mediation models

  • Definitions contingent on model
    • (even if causal quantities have a meaning regardless of estimation method)
  • Most papers do not consider confounders, or even check for assumptions
  • Generalizations to interactions, multiple mediators, etc., requires care.

Keenan Crane

23 / 28

Extension: moderated mediation

Consider a more complex setting where the effect of the experimental factor X depends on the mediator, a case termed moderated mediator Judd and Kenny (1982).

In this case, the equation for the response variable becomes E(YM=m,X=x,Z=z)=cY+βx+γm+κxm+zω

24 / 28

ACME for moderated mediation

Upon substituting the equations for both inside the definition of average causal mediation effect, we find that the latter equals ACME(x)=(γ+κx){M(1)M(0)}=α(γ+κx). and thus the value differs depending on experimental regime (treatment or control), due to the presence of the interaction.

Both the average direct and total effects now depend on the theoretical average values of the covariates Z added to the model to control for confounding.

25 / 28

General approach

Imai et al. (2010) suggest using simulation for general models that naturally account for nonlinear effects, different natures of the mediator (binary, categorical, etc.) and the response.

  • [1] Modelling. Specify models to each relationship
    1. a mediator model fM(x,z;θM) that includes X and potential confounders Z
    2. an outcome model fY(x,m,z;θY) with both treatment indicator X, mediator M and potential confounders Z.
  • [2] Draw M realizations of the mediation model for each observation i=1,,n, giving Mi(jm)(1) and Mi(jm)(0). Use these resulting to obtain one draw from the outcome model for each of
    Yi(m){x1,Mi(m)(x2)},x1,x2{0,1}.
26 / 28

General approach

  • [3] Plug these quantities in the definitions of ACME(x), ADE(x) and TE, averaging over the nM replications, over both observations i=1,,n and replications m=1,,M.
  • [4] Estimation uncertainty: Either use nonparametric bootstrap or a large-sample approximation to the distribution of model parameters θM and θY, repeat steps [2]--[3] to get J copies of ACME(x), ADE(x) and TE.
  • [5] Use the J replications to compute a 95% percentile interval and return the sample means over J for the average causal effects.
27 / 28

Key references

28 / 28

Linear mediation

2 / 28
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
oTile View: Overview of Slides
Esc Back to slideshow