Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2014 Oct 10.
Published in final edited form as: Epidemiol Methods. 2014 Jan 3;2(1):21–31. doi: 10.1515/em-2012-0005

A Note on formulae for causal mediation analysis in an odds ratiocontext

Eric J Tchetgen Tchetgen a,b
PMCID: PMC4193811  NIHMSID: NIHMS575549  PMID: 25309848

Abstract

In a recent manuscript, VanderWeele and Vansteelandt (American Journal of Epidemiology, 2010,172:1339–1348) (hereafter VWV) build on results due to Judea Pearl on causal mediation analysis and derive simple closed-form expressions for so-called natural direct and indirect effects in an odds ratio context for a binary outcome and a continuous mediator. The expressions obtained by VWV make two key simplifying assumptions:

  1. The mediator is normally distributed with constant variance,

  2. The binary outcome is rare.

Assumption A may not be appropriate in settings where, as can happen in routine epidemiologic applications, the distribution of the mediator variable is highly skew. However, in this note, the author establishes that under a key assumption of “no mediator-exposure interaction” in the logistic regression model for the outcome, the simple formulae of VWV continue to hold even when the normality assumption of the mediator is dropped. The author further shows that when the “no interaction” assumption is relaxed, the formula of VWV for the natural indirect effect in this setting continues to apply when assumption A is also dropped. However, an alternative formula to that of VWV for the natural direct effect is required in this context and is provided in an appendix. When the disease is not rare, the author replaces assumptions A and B with an assumption C that the mediator follows a so-called Bridge distribution in which case simple closed-form formulae are again obtained for the natural direct and indirect effects.


Recent advances in causal inference have provided a mathematical formalization of mediation analysis.13 Specifically, the counterfactual language of causal inference has allowed for new definitions of causal effects in the mediation context, accompanied by formal identification conditions, and corresponding nonparametric formulae for computing these new types of causal effects.19 In a recent manuscript, VanderWeele and Vansteelandt6 (VWV) build on results due to Judea Pearl2,3 on causal mediation analysis and derive simple closed-form expressions for so-called natural direct and indirect effects in an odds ratio context for a binary outcome and a continuous mediator. General definitions and identifying assumptions of natural direct and indirect effects in an odds ratio context are described in great detail in VWV and are not reproduced here. However, to obtain closed-form expressions for natural direct and indirect effects, VWV require two key simplifying assumptions which are reproduced here:

  1. The mediator is normally distributed with constant variance

  2. The binary outcome is rare.

Assumption A may not be appropriate in settings where, as can happen in routine epidemiologic applications, the distribution of the mediator variable is highly skew. However, in this note, the author establishes that under a key assumption of “no mediator-exposure interaction” in the logistic regression model for the outcome, the simple formulae of VWV continue to hold even when the normality assumption of the mediator is dropped. The author further shows that when the “no interaction” assumption is relaxed, the formula of VWV for the natural indirect effect in this setting continues to apply when assumption A is also dropped. However, an alternative formula to that of VWV for the natural direct effect is derived in this context. When the disease is not rare, the author replaces assumptions A and B with an assumption C that the mediator follows a so-called Bridge distribution in which case simple closed-form formulae are again obtained for the natural direct and indirect effects.10

Relaxing the normality assumption

To proceed consider the statistical model studied by VWV. In their basic set up, they assume independent and identically distributed data (C, A, M, Y) are observed on n individuals, where Y is the binary outcome of interest, A is the exposure, M is a continuous mediator variable measured prior to Y and subsequently to A, and C are pre-exposure confounders of the effects of (A, M) on Y. VWV assume the following regression models:

logitPr(Y=1A=a,M=m,C=c)=θ0+θ1a+θ2m+θ4c (1)

and

E[MA=a,C=c]=β0+β1a+β2c (2)

where, under (2) the error term Δ = (ME[M|A, C]) for the linear regression of [M|A, C] is normally distributed with constant variance. VWV show that, under the nonparametric identifying assumptions 1–4 of their paper, assumptions A and B given above, and the parametric modeling assumptions (1) and (2), odds ratio natural direct and indirect effects are given by the simple formulae

ORa,acNDE(a)=exp(θ1(aa)) (3)
ORa,acNIE(a)=exp(θ2β1(aa)) (4)

so that given a fixed value a*, the total causal effect of A on Y within levels of C, comparing the odds of Y when A = a versus when A = a*

ORa,aTE=Pr(Y=1A=a,C=c)Pr(Y=0A=a,C=c)Pr(Y=0A=a,C=c)Pr(Y=1A=a,C=c)

can be decomposed on the odds ratio scale into natural direct and indirect causal effects according to6:

ORa,aTE=ORa,acNDE(a)×ORa,acNIE(a)=exp((θ1+θ2β1)(aa)) (5)

In the appendix, it is established that the formulae (3),(4) and therefore formula (5) continue to hold even when the normality assumption is replaced by the weaker assumption:

  • A'.

    The error term Δ for the linear regression (2) for M is independent of (A, C).

Thus, by eliminating the requirement that the mediator is normally distributed, the result considerably broadens the scope of settings in which the methodology of VWV remains appropriate. In fact, the result states that their formulae (3) and (4) continue to hold even when as can occur in epidemiologic applications, the mediator M is not normally distributed, provided that the regression model (2) completely characterizes the relation between the mediator, and exposure and confounding variables, i.e. the residual Δ does not further depend on (A, C).

The above result depends on the crucial “no exposure-mediator interaction” assumption imposed in the logistic regression model (1). VWV also considered mediation analyses under an alternative more general model for the risk of the outcome:

logitPr(Y=1A=a,M=m,C=c)=θ0+θ1a+θ2m+θ3ma+θ4c (6)

where θ3 now encodes the interaction (on the odds ratio scale) between the exposure and the mediator variables, and the special case θ3 = 0 recovers model (1). Under the nonparametric identifying assumptions 1–4 of their paper, assumptions A' and B given above, and the parametric modeling assumptions (2) and (6), VWV establish that

ORa,acNIE(a)=exp{(θ2+θ3a)β1(aa)}

In the appendix, it is shown that the formula in the above display continues to hold when assumption A is replaced by the weaker assumption A'. However, the formula for ORa,acNDE(a) given in VWV under model (6) no longer applies under assumption A' if assumption A does not also hold. An alternative expression for ORa,acNDE(a) in this latter setting is given in an online appendix. For inference, standard errors of estimators of ORa,acNIE(a) and ORa,acNDE(a) under the various modeling assumptions considered above can be obtained as in VWV by straightforward application of the delta method, details are relegated to the online appendix.

Relaxing the rare disease assumption

In this section, simple closed-form formulae are derived for the natural direct and indirect odds ratios ORa,acNIE(a) and ORa,acNDE(a), in a setting where the outcome of interest is not rare. The formulae are obtained upon replacing both assumptions A (or equivalently assumptions A') and B with the following alternative distributional assumption for the mediator density:

  • C.
    The conditional density of [Δ|A, C] follows a so-called “Bridge distribution” (more specically, a Bridge distribution for the logit link):10
    fΔ[dA=a,C=c]=sin(πϕ)cos(πϕ)+cosh(ϕd);<d<,0<ϕ<1
    where cosh(x)=1exp(x)+exp(x)

The bridge density given above is denoted Bl(0, ϕ), where the first argument indicates that it has mean zero, ϕ is a rescaling parameter and the subscript l stands for logistic. The variance of Bl(0, ϕ) is given by the simple formula:

π23(ϕ21)

so that the variance of Bl(0, ϕ) approaches zero as ϕ approaches one. Bl(0, ϕ) is symmetric and has a different shape from that of the Gaussian distribution.10 When standardized to have unit variance, the bridge density can be shown to have slightly heavier tails than the standard normal and lighter tails than the standard logistic. Wang and Louis10 provide a detailed study of Bl(0, ϕ). For our purposes, the bridge distribution Bl(0, ϕ) is of interest in the present setting because it is the unique covariate distribution under which marginalization of a standard multiple logistic regression model with respect to a single covariate (with a bridge distribution) produces a marginal regression that is again a standard logistic regression with regression parameters rescaled by an amount determined by ϕ. More specifically, consider the standard logistic regression model (1) for the conditional density of [Y|A, M, C], then under model (2) paired with assumption C, we have that the marginal (with respect to M) regression model of [Y|A, C] is again a standard logistic regression:

logitPr(Y=1A=a,C=c)=γ0+γ1a+γ4c

where

γ1=k(θ1+θ2β1)

and

k={θ22(ϕ21)+1}12

Similar expressions relating γ0 and γ4 to θ1, θ24 and ϕ are provided in the online appendix: The main point is that standard multiple logistic regression is closed under marginalization of a continuous covariate with a bridge distribution. A more general formulation of the above result is used in the online appendix to establish that under the nonparametric identifying assumptions 1–4 of VWV, the parametric modeling assumptions (1) and (2), and assumption C:

ORa,acNDE(a)=exp(kθ1(aa)) (7)
ORa,acNIE(a)=exp(kθ2β1(aa)) (8)

Note the similarity between formulae (3) and (4), and formulae (7) and (8) where the factor k in the latter two expressions accounts for a non-rare outcome under assumption C that the mediator follows a bridge distribution. Analogous formulae are provided in the online appendix that incorporate an interaction between the mediator and exposure variables under model (6).

Concluding remarks

In this note, the author has extended the results of VWV in a number of interesting directions, by providing weaker conditions under which their simple estimators of natural direct and indirect effects remain valid, and by providing alternative distributional assumptions under which the assumption of a rare outcome can be dropped and yet simple formulae are still available for routine use in epidemiologic practice. However, it is important to note that as in VWV, the methods described herein rely on fairly strong modeling assumptions and can deliver severely biased inferences under modeling error of regression models such as models (2) and (6). As a possible remedy, alternative so-called multiply robust estimators have recently been proposed, that deliver valid inferences about natural direct and indirect effects even when, as can happen in practice, a statistical model for the likelihood of [Y, M, A|C] is partially mis-specified.79

APPENDIX

Closed form expressions for ORa,acNDE(a) and ORa,acNIE(a)

Under the nonparametric identifying assumptions 1–4 of their paper, assumptions A' and B given in the paper, and the parametric modeling assumptions (2) and (7), we have that

g(a,a,c)=Pr{Y=1A=a,C=c,M=m}f(mA=a,C)dmexp(θ0+θ1a+θ2m+θ3ma+θ4c)f(mA=a,C)dm=exp(θ0+θ1a+θ4c)exp(θ2m+θ3ma)f(mA=a,C)dm=exp(θ0+θ1a+θ4c)exp((θ2+θ3a)m)f(mA=a,C)dm=exp(θ0+θ1a+θ4c)MMA=a,C=c(θ2+θ3a) (9)

where MMA=a,C=c() is the moment generating function of [M|A = a*, C = c] evaluated at (·).

Note that under our assumptions,

MMA=a,C=c(θ2+θ3a)=exp{(θ2+θ3a)(β0+β1a+β2c)}MΔ(θ2+θ3a) (10)

where MΔ() is the moment generating function of [Δ|A = a*, C = c] evaluated at (·). We conclude that by a result due to Pearl2;3 (also see VWV6)

ORa,acNDE(a)g(a,a,c)g(a,a,c)=exp(θ0+θ1a+θ4c)exp{(θ2+θ3a)(β0+β1a+β2c)}MΔ(θ2+θ3a)exp(θ0+θ1a+θ4c)exp{(θ2+θ3a)(β0+β1a+β2c)}MΔ(θ2+θ3a)=exp[{θ1+(θ3(β0+β1a+β2c))}(aa)]MΔ(θ3(aa))

and

ORa,acNIE(a)=g(a,a,c)g(a,a,c)=exp(θ0+θ1a+θ4c)exp{(θ2+θ3a)(β0+β1a+β2c)}MΔ(θ2+θ3a)exp(θ0+θ1a+θ4c)exp{(θ2+θ3a)(β0+β1a+β2c)}MΔ(θ2+θ3a)=exp{β1(θ2+θ3a)(aa)}

which reduces to the formulae provided in the text for the special case where θ3 = 0. For inference when θ3 ≠ = 0, estimation of ORa,acNDE(a) requires an estimator of MΔ(θ3(aa)). To motivate a simple estimator of the latter quantity, note that under model (2) and assumption C:

MΔ(θ3a)=E[exp{θ3aM}]E[exp{θ3a(β0+β1A+β2C)}]

since the numerator is equal to

E[exp{θ2aM}]=E[exp{θ3a(β0+β1A+β2C}]MΔ(θ3a)

and thus, similarly we have that

MΔ(θ3(aa))=E[exp{θ3(aa)M}]E[exp{θ3(aa)(β0+β1A+β2C)}]

which gives

ORa,acNDE(a)exp[{θ1+(θ3(β0+β1a+β2c))}(aa)]E[exp{θ3(aa)M}]E[exp{θ3(aa)(β0+β1A+β2C)}]

We conclude that MΔ(θ3(aa)) and therefore ORa,acNDE(a) is consistently estimated upon substituting empirical averages for unknown marginal expectations and consistent estimates for unknown parameters in the equation in the above display. Note that consistent estimation of θ=(θ0,θ1,θ2,θ3,θ4) and β=(β0,β1,β2) are readily obtained under standard logistic regression θ^ and ordinary least-squares β^ respectively.

The variance-covariance matrix of the resulting estimator (OR^a,acNIE(a)) of log(ORa,acNIE(a)) is obtained using a straightforward application of the delta method and details can be found in VWV. The variance-covariance matrix of log(OR^a,acNDE(a)) is similarly obtained under the “no interaction” assumption. However, more generally when θ3 ≠ 0, requires derivations not included in VWV. To proceed, let IFθ,β denote the influence function of (θ^,β^). Let

Φ1(β,θ)={θ1+(θ3(β0+β1a+β2c))}(aa),
Φ2(β,θ)=logE[exp{θ3(aa)M}]
Φ3(β,θ)=logE[exp{θ3(aa)(β0+β1A+β2C)}]

. Then one can show that the influence function of [Φ1 (β, θ), Φ2 (β, θ), Φ3 (β, θ)]′ is given by

IFΦ=[IFΦ1,IFΦ2,IFΦ3]

′, where:

IFΦ1=G1IFθ,β

with

G1=[0,(aa),0,(β0+β1a+β2c)(aa),0θ3(aa),θ3a(aa),θ3c(aa)],
IFΦ2=E[exp{θ3(aa)M}]1UΦ2

with

UΦ2=exp{θ3(aa)M}+E(aa)Mexp{θ3(aa)M}][0,0,0,1,0,0,0,0]IFθ,β

and

IFΦ3=E[exp{θ3(aa)(β0+β1A+β2C)}]1UΦ3

with

UΦ3=exp{θ3(aa)(β0+β1A+β2C)}E[exp{θ3(aa)(β0+β1A+β2C)}]+[0,0,0,E[(aa)(β0+β1A+β2C)exp{θ3(aa)(β0+β1A+β2C)}],0,E[θ3(aa)exp{θ3(aa)(β0+β1A+β2C)}],E[θ3A(aa)exp{θ3(aa)(β0+β1A+β2C)}],E[θ3(aa)Cexp{θ3(aa)(β0+β1A+β2C)}]]×IFθ,β

Thus, the large sample variance of log(OR^a,acNDE(a)) is approximately given by

n1[1,1,1]E(IFΦIFΦT)[1,1,1]

A consistent estimator of the above quantity is obtained by substituting empirical expectations for all unknown expectations, and consistent estimators of unknown parameters. The above construction requires the influence function IFθ,β for standard logistic regression and ordinary least squares estimation, which is of the form:

(E(X1X1T)1X1εE(X2X2T)1X2Δ)

with X1 = [1, A, M, AM, C′], X2 = [1, A, C′] and ε = Y – Pr(Y = 1|A, M, C).

Closed form expressions for ORa,acNDE(a) and ORa,acNIE(a) under a Bridge distribution

Consider the logistic regression model

logitPr(Y=1A=a,M=m,C=c)=θ0+θ1a+θ2m+θ3ma+θ4c

where

M=β0+β1A+β2C+Δ

and

[ΔA,C]~Bl(0,ϕ)

Note that

g(a,a,c)=Pr(Y=1A=a,M=m,C=c)f(ma,c)=expit{θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+(θ2+θ3a)Δ+θ4c}f(Δ)dΔ=expit{θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+Δ~+θ4c}f(Δ~)dΔ~

where expit(logit(x))=1,f(Δ) is a bridge density with rescaling parameter

ϕ~(a)=ϕ~(a;θ2,θ3,ϕ)={(θ2+θ3a)2(ϕ21)+1}12.

Then, a result due to Louis and Wang10 implies that

g(a,a,c)=expit(ϕ~(a){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})

and therefore

ORa,acNDE(a)=exp(ϕ~(a){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})exp(ϕ~(a){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})
ORa,acNIE(a)=exp(ϕ~(a){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})exp(ϕ~(a){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})=exp(β1(θ2+θ3a)ϕ~(a)(aa))

under the “no interaction” assumption θ3 = 0, we obtain

ORa,acNDE(a)=exp({θ22(ϕ21)+1}θ1(aa))=exp(kθ1(aa))
ORa,acNIE(a)=exp(kβ1θ2(aa))

A consistent estimator ϕ^ of ϕ is obtained by the method of moment upon noting that ϕ = ϕ (α) =expit(α) solves the population equation :

E{U(α;β)}=0

where Uα(α;β)=Δ(β)2π23([expit(α)]21). It can then be shown that the influence function of (θ^,β^,α^) is given by IFθ,β,α

IFθ,β,α=(E(X1X1T)1X1εE(X2X2T)1X2ΔE(Uϕ(ϕ;β)ϕ)1U(α;β))

Let OR^a,acNDE(a) and OR^a,acNIE(a) the estimators of ORa,acNDE(a) and ORa,acNIE(a) respectively obtained upon substituting (θ^,β^,ϕ^) for (θ, β, ϕ). The large sample variances of OR^a,acNDE(a) and OR^a,acNIE(a) are then obtained by a straightforward application of the delta method, mainly:

var(OR^a,acNDE(a))n1H1E(IFθ,β,αIFθ,β,α)H1

where

H1=(θ,β,α){(ϕ~(a;θ2,θ3,ϕ(α)){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})(ϕ~(a;θ2,θ3,ϕ(α)){θ0+θ1a+(θ2+θ3a)(β0+β1a+β2c)+θ4c})}

and

var(OR^a,acNIE(a))n1H2E(IFθ,β,αIFθ,β,α)H2

where

H2=(θ,β,α){β1(θ2+θ3a)ϕ~(a;θ2,θ3,ϕ(α))(aa)}

References

  • [1].Robins JM, Greenland S. Identifiability and exchangeability for direct and indirect effects. Epidemiology. 1992;3:143–155. doi: 10.1097/00001648-199203000-00013. [DOI] [PubMed] [Google Scholar]
  • [2].Pearl J. Direct and indirect effects. Proceedings of the Seventeenth Conference on Uncertainty and Artificial Intelligence; San Francisco, CA: Morgan Kaufmann; 2001. pp. 411–420. [Google Scholar]
  • [3].Pearl J. The Mediation Formula: A guide to the assessment of causal pathways in nonlinear models. In: Berzuini C, Dawid P, Bernardinelli L, editors. Causality:Statistical Perspectives and Applications. 2011. To appear. Forthcoming, 2011. [Google Scholar]
  • [4].van der Laan M, Petersen M. Direct Effect Models. (U.C. Berkeley Division of Biostatistics Working Paper Series).Working Paper 187. 2005 http://www.bepress.com/ucbbiostat/paper187.
  • [5].Imai K, Keele L, Yamamoto T. Identification, inference and sensitivity analysis for causal mediation effects. Statistical Science. 2010a;25:51–71. [Google Scholar]
  • [6].VanderWeele TJ, Vansteelandt S. Odds ratios for mediation analysis with a dichotomous outcome. American Journal of Epidemiology. 2010;172:1339–1348. doi: 10.1093/aje/kwq332. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Tchetgen Tchetgen EJ, Shpitser I. Semiparametric Theory for Causal Mediation Analysis: efficiency bounds, multiple robustness and sensitivity analysis. 2011 Jun 3rd; doi: 10.1214/12-AOS990. 2011. http://www.bepress.com/harvardbiostat/paper130/ [DOI] [PMC free article] [PubMed]
  • [8].Tchetgen Tchetgen EJ, Shpitser I. Semiparametric Estimation of Models for Natural Direct and Indirect Effects. 2011a Jun 3rd; 2011. http://www.bepress.com/harvardbiostat/paper129.
  • [9].Tchetgen Tchetgen Eric J. On Causal Mediation Analysis with a Survival Outcome. The International Journal of Biostatistics. 2011;7(1) doi: 10.2202/1557-4679.1351. Article 33. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [10].Wang Z, Louis T. Matching conditional and marginal shapes in binary random intercept models using a bridge distribution function. Biometrika. 2003;90(4):765–775. [Google Scholar]

RESOURCES