Professional Documents
Culture Documents
∗
I thank Tihomir Asparouhov, Michael Sobel, Hendricks Brown, David MacKinnon, and
Judea Pearl for helpful advice
1
Abstract
ordinal or nominal mediator are given using Mplus to compute the effects.
be carried out. This can be used both in planning a new study and in
2
1 Introduction
This paper considers mediation analysis (see, e.g., Baron & Kenny, 1986;
see, e.g., Goldberger & Duncan, 1973; Jöreskog and Sörbom, 1979; Bollen,
1989). Mediation analysis in SEM uses the terms direct and indirect effects.
The implication that the direct and indirect effects produced by SEM are
causal effects has been criticized in e.g. Holland (1988) and Sobel (2008),
(2010, 2011a). The challenge in using mediation for causal inference comes
about the best language to use as seen in the recent debate in the journal
NeuroImage (Lindquist & Sobel, 2010, 2011; Glymour, 2011; Pearl, 2011b).
SEM effect concepts and causal effect concepts in mediation analysis, and
and indirect effects produced by Mplus. The paper shows that causally-
defined direct and indirect effects are not necessarily the same as effects
effects that have not been used in SEM practice. The causally-defined
effects can be obtained via extended types of SEM analyses. To claim that
3
effects are causal, however, it is not sufficient to simply use the causally-
with a binary outcome and a binary, ordinal and nominal mediators are
mediation and latent variable mediation are discussed. For the paper to be
mediator interaction
Consider Figure 1 which corresponds to a randomized trial with a binary
4
mediator interact in their influence on the outcome y. This possibility is
al., 2008). As pointed out in e.g. VanderWeele and Vansteelandt (2009), the
possibility of this interaction was emphasized in Judd and Kenny (1981) but
not in the influential Baron and Kenny (1986) article on mediation, and is
therefore often not explored. The interaction possibility is, however, stated
in James and Brett (1984) and more recently in Preacher et al. (2007). The
first discuss the SEM concepts of direct and indirect effects and then the
effects
Assuming linear relationships, Figure 1 translates into
yi = β0 + β1 mi + β2 xi + β3 xi mi + β4 ci + 1i , (1)
mi = γ0 + γ1 xi + γ2 ci + 2i , (2)
where the residuals 1 and 2 are assumed normally distributed with zero
means, variances σ12 , σ22 , and uncorrelated with each other and with the
predictors in their equations. SEM considers the reduced form of this model,
5
obtained by inserting (2) in (1),
β4 ci + 1i , (3)
= β0 + β1 γ0 + β1 γ1 xi + β3 γ0 xi + β3 γ1 x2i + β2 xi + β1 γ2 ci + β3 γ2 xi ci +
case, the reduced-form expression of (4) states that the direct effect of x on
Second, let β3 6= 0. In this case, the definitions of the direct and indirect
effect are perhaps less clear. One may consider the direct effect to be
part of the influence of x on m and the third term is included for the same
reason. In this way, there can be a direct effect even if β2 = 0. One may
β1 = 0.
are not valid for a model such as Figure 1 due to the treatment-mediator
interaction, but reports the direct effect as β2 and the indirect effect as
6
4 Causal inference concepts of direct and
indirect effects
Causally-defined direct and indirect effects were introduced in Robins and
Greenland (1992) and further elaborated in Pearl (2001) and Robins (2003).
Drawing on this work, some of the more accessible treatments of direct and
see also Valeri and VanderWeele (2011), and Imai et al. (2010a,b). Valeri
and VanderWeele (2011) describe macros for SAS and SPSS, and Imai et
and Imai et al. (2010b) give formal, technical statements of the assumptions
tionship.
tionship.
Assumptions (i) and (ii) are sufficient for the controlled direct effect defined
below. The direct and indirect effects defined below require all four
7
means that even with randomized treatment, direct and indirect effects
require that assumptions (ii) and (iv) be fulfilled. Taken together, this is
(ii) and (iv) may often not be fulfilled. As pointed out in VanderWeele and
whether data is available for all such variables.” Even in randomized studies
this means that the causally-defined effects are biased unless assumptions
(ii) and (iv) hold, and if assumption (iv) does not hold causal effects cannot
analysis is illustrated in a later section for both simulated and real data.
potential outcome. Let Yi (x) denote the potential outcome that would have
been observed for that subject had the treatment variable X been set at the
variables). The Yi (x) outcome may not be the outcome that is observed for
for a subject can be seen as Yi (1) − Yi (0), but is clearly not identified given
that a subject only experiences one of the two treatments. The average
the potential outcome that would have been observed if the treatment for
8
the subject was x and the value of the mediator M was m.
Following are definitions of the total, direct, and indirect effects. The
formulas are general, that is, not based on a particular model such as the
linear model for continuous variables of (1) and (2). Because of this, they
where M = m for a fixed value m. The first index of the first term is 1
corresponding to the treatment group and the first index of the second term
The direct effect (often called the pure or natural direct effect) does not
hold the mediator constant, but instead allows the mediator to vary over
subjects in the way it would vary if the subjects were given the control
× f (M | C = c, X = 0) ∂M, (7)
(6) Y’s first argument, that is x, changes values, but the second does not,
between the outcome in the treatment and control group when the mediator
is held constant at the values it would obtain for the control group. The
9
right-hand side of (7) is part of what is referred to as the Mediation Formula
A simple way to view this is to note that the first argument of Y in (8)
does not change, but the second does, implying that Y is influenced by X
the treatment group when the mediator changes from values it would obtain
in the treatment group to the values it would obtain in the control group.
The name total indirect effect is used in Robins (2003), while Pearl (2001)
and VanderWeele and Vansteelandt (2009) call it the natural indirect effect.
A simple way to view this is to note that both indices are 1 in the first term
and 0 in the second term. In other words, the treatment effect on Y comes
both directly and indirectly due to M. The total effect is the sum of the
T E = DE + T IE. (12)
10
The pure indirect effect (Robins, 2003) is defined as
Here, the effect of X on Y is only indirect via M. This is called the natural
The difference between TIE and PIE is shown below for the model of (1)
and (2).
model
The appendix Section 13.1 (see also the Appendix of VanderWeele &
Vansteelandt, 2009) shows how the direct effect in (7) and the total indirect
parameters of the model of (1) and (2) by integrating over the distribution
DE = β2 + β3 γ0 + β3 γ2 c. (14)
This agrees with the direct effect conjectured for the reduced form of the
SEM approach above, but the results are obtained via a clear definition.
T IE = β1 γ1 + β3 γ1 . (15)
This agrees with the indirect effect conjectured for the reduced form of
the SEM approach above. The pure indirect effect excludes the interaction
11
part,
P IE = β1 γ1 . (16)
can be used to express the causal direct and indirect effects. The causal
effects. As will be seen in the next sections, there is not necessarily a similar
agreement between effects used in SEM practice and the causal effect results
treatment-mediator interaction
Monte Carlo simulations are useful for planning purposes to determine the
sample size needed to recover parameter values well and to have sufficient
power to detect various effects. Mplus has quite general Monte Carlo
Consider again the model of Figure 1 as explicated in (1) and (2), but
12
the treatment and the mediator in
yi = β0 + β1 mi + β2 xi + β3 xi mi + 1i (17)
β1i = β1 + β3 xi + i , (19)
where the residual has not only zero mean but also zero variance. A
line with random coefficient regression shown in ex 3.9 in the Mplus User’s
input for a Monte Carlo simulation shown in Section 14.1. 500 samples
of size 400 are generated in a first step. A second step analyzes the 400
direct and indirect effects defined in Section 4. The effects are computed
Standard errors are automatically produced using the delta method. The
results are shown in Table 1 for the second step. The results for the first step
are exactly the same, except for a slight difference in the standard errors
using the MLR estimator instead of ML. The Mplus input gives comments
to describe the quantities derived from the model parameters. The new
parameters tie, pie, and de correspond to the indirect and direct effects
13
of (15), (16), and (14). It is seen that all parameters are well recovered
and standard errors are well estimated. The last two columns show good
95% coverage and good power to reject that the parameter is zero. For
a description of how to interpret the Mplus Monte Carlo output, see pp.
362-365 of the User’s Guide, Muthén and Muthén (1998-2010). The setup
can be used for planning purposes to study coverage and power at different
distribution. This is particularly the case with small sample sizes and in
14
6 Mediation modeling with a binary out-
In this case, the Mplus direct and indirect effects of SEM are defined
and therefore use the same formulas as before. This is also the approach
observed binary outcome may be less well known, but have been presented
Weele and Vansteelandt (2010) define causal effects for the observed binary
outcome. They consider logistic regression for (1) and assume that y
that is, using the same formula as in (15), but with parameters on the logit
scale.
of the binary outcome being rare. Appendix Section 13.2 derives causally-
defined direct and indirect effects (see also Imai et al., 2010a, Appendix F).
Using the definition in (9), the causal total indirect effect is expressed as
15
the probability difference
probit(x, x0 ) = [β0 +β2 x+β4 c+(β1 +β3 x)(γ0 +γ1 x0 +γ2 c)]/ v(x), (22)
p
where σ22 is the residual variance for the continuous mediator m. Although
covariate is present).
The total indirect effect odds ratio for the binary y related to the binary
x can be expressed as
For any given data set, this odds ratio can be compared to that in (20)
computed via logistic regression and assuming that the outcome y is rare.
Using the definition in (13), the pure indirect effect is expressed as the
probability difference
16
Φ[probit(0, 1)] − Φ[probit(0, 0)]. (25)
probability difference
case
To put the causal indirect and direct effects in perspective, consider the
c. In this case the causal indirect effect Φ[probit(1, 1)] − Φ[probit(1, 0)] has
probit arguments
q
probit(1, 1) = [β0 + β2 + β1 γ0 + β1 γ1 ]/ β12 σ22 + 1, (27)
q
probit(1, 0) = [β0 + β2 + β1 γ0 ]/ β12 σ22 + 1. (28)
for the probit as the product β1 γ1 and considering the probability difference
q
a = [β0 + β1 γ0 + β1 γ1 ]/ β12 σ22 + 1, (29)
q
b = [β0 + β1 γ0 ]/ β12 σ22 + 1. (30)
The difference between the causal and naive indirect effect approaches is
that the direct effect slope β2 plays a role in the former, but not in the
17
latter.
Noting that Φ(b) = Φ[probit(0, 0)], the causal direct effect Φ[probit(1, 0)]−
q
probit(1, 0) = [β0 + β2 + β1 γ0 ]/ β12 σ22 + 1, (31)
q
probit(0, 0) = [β0 + β1 γ0 ]/ β12 σ22 + 1. (32)
A naive approach may instead focus on the direct effect β2 and consider
q
a0 = [β0 + β2 ]/ β12 σ22 + 1, (33)
q
0
b = [β0 ]/ β12 σ22 + 1. (34)
The difference between the causal effects and the effects obtained by
what is called the naive approach has been studied in Imai et al. (2010a)
a Monte Carlo simulation study to show the biases, while Pearl (2011c)
direct effects. Alternative, naive, approaches do not have the same causal
interpretation.
The direct and indirect effects can be estimated in Mplus using maximum-
likelihood. Standard errors of the direct and indirect causal effects are
18
obtained by the delta method using the Mplus MODEL CONSTRAINT
(21) and (26). This is because in the logistic case the integration over
the mediator does not lead to an explicit form, but calls for numerical
integration.
in Mplus, where effects can be derived using approximate odds ratios under
The direct and indirect effect formulas given above in the probit case assume
One type of non-normality may arise when the mediator can be viewed
19
exceeding thresholds as illustrated in Figure 2. Although the observed
on the covariates.
0 if m∗i ≤ τ1
mi =
1 if τ1 < m∗i < τ2
if τ2 ≤ m∗i
2
The key point is that the continuous latent response variable m∗ is used
not only as a dependent variable in (36) but also replaces the observed
are still valid. This type of model can be estimated in Mplus using weighted
a binary outcome, a Monte Carlo study is carried out for a model like the
20
one in Figure 1, using n = 200. The same two steps are used as in the Monte
Carlo study of Section 5. Data are generated using probit for the binary
outcome. Appendix Section 14.2 shows the Mplus input for Step 1 and the
Table 2 and Table 3 show the results for the two estimators (the Bayes
parameters, including the causal effects, are well estimated with good
coverage.
Appendix Section 14.2 also shows the Mplus input for a Bayesian
analysis of the data generated in the first replication of the simulation. This
shows the posterior for the odds ratio corresponding to the direct effect
(orde) and Figure 4 shows the posterior for the odds ratio corresponding
close to normally distributed. Vertical lines at the tails show the upper
and lower limits of the Bayesian 95% credibility interval. Bayes has the
advantage that this interval is not symmetrically placed around the mean
Bayes will give similar point estimates for these odds ratios but different
confidence/credibility intervals.
21
[Figure 3 about here.]
court record
Data for this example are from a randomized field experiment in Baltimore
shows the Fall baseline aggression score as agg1, observed before the
agg5 is the aggression score in Grade 5 after the intervention ended. The
The juvcrt outcome is not rare, but is observed for 50% of the sample.
covariate agg1 has a distribution similar to the mediator agg5, the agg5
Causal effect estimates are computed using the probit approach. They
22
are compared with those of the logistic regression approach, mistakenly
analysis of this model using probit and logit. The probit output is shown
due to the indirect effect of treatment. The odds ratio for the indirect
the indirect and direct effects labeled ind and dir at the top of the new
parameters section, which use the regular definitions in (15) and (14), that
is, considering the continuous latent response variable for the outcome as
the odds ratio under the rare outcome assumption of (20) is 0.734 and
is also significantly different from one; see Table 5. This means that in
the current example, the probit and logistic approaches give quite similar
23
The Mplus input in Appendix Section 14.3 can be easily adapted to
need not be changed if the same parameter labels are used in the MODEL
zero, that is, the effect is evaluated at the average of the covariate c.
measured about six months after baseline. The outcome is cigarette use in
18% of the sample. The data for n = 864 students are shown in Table 6.
distributed in either the treatment or control group. This means that the
data are analyzed not only using the observed mediator approach but also
24
the latent response variable mediator approach discussed in Section 6.3.
latent response variable given the treatment dummy variable, treating the
estimation. Appendix Section 14.4 shows the Mplus inputs. Table 7 and
Table 8 show the results using probit for the observed and latent mediator
approach, respectively.
For the observed mediator approach using probit, the causal direct effect
odds ratio is 0.731, while the causal indirect odds ratio is 0.853. Using
logistic regression (not shown), the causal indirect odds ratio is 0.843, that
For the latent mediator approach using probit, the causal direct effect
odds ratio is 0.829, while the causal indirect odds ratio is 0.796. This means
that the latent mediator approach results in a stronger indirect effect and
25
7 Mediation modeling with a binary me-
diator
When the mediator is binary, a latent mediator approach or an observed
effects have not been developed in SEM software. Direct and indirect
effects for this case have, however, been discussed in Winship and Mare
(1983), although not from a causal inference perspective. Causal direct and
indirect effects for the case of a binary observed mediator and a continuous
and VanderWeele (2011) this is studied only in the special case of logistic
approaches are typically called for. The formulas are expressed here in terms
26
7.1 Causal effects with a binary mediator and a
binary outcome
In Section 4 the direct, total indirect, and pure indirect effects are defined
as
Appendix Section 13.3 shows that with a binary mediator and a binary
DE = [FY (1, 0) − FY (0, 0)] [1 − FM (0)] + [FY (1, 1) − FY (0, 1)] FM (0),
(40)
regression. These formulas agree with those of Pearl (2010, 2011a). The
following sections give two examples, applying these causal effects using
Mplus.
27
7.2 Pearl’s hypothetical binary case
2011 (see web reference below). Table 9 shows the design of the example.
The top part of the table suggests that the percentage cured is higher in
the treatment group for both enzyme levels and that the effect of treatment
Section 7.1, however, the interaction should not be expected to take a simple
linear form as in Section 4.1. An analysis is needed to clarify what role the
enzyme mediator plays. While this can be done using the population values
of Table 9, a Monte Carlo simulation study is carried out to also study the
being in the control and treatment groups, Mplus Monte Carlo simulations
are carried out using the specifications of Table 9. Data are generated and
analyzed using both logit and probit. The Mplus inputs are shown in the
appendix Section 14.5, also giving the definitions of the quantities derived
from the model parameters. These include ratios of direct and indirect
28
effects relative to the total effect as in Pearl (2010, 2011a). The effects
are labeled de for direct effect, tie for total indirect effect (natural indirect
effect), pie for pure indirect effect, te for total effect, with ratios dete, tiete,
te = de + tie.
Table 10, the results for probit with maximum-likelihood estimation are
shown in Table 11, and the results for probit with Bayesian estimation are
shown in Table 12. It is seen that all causal effects are well recovered, giving
the interaction effect shows up most clearly in the difference between the
total indirect effect (tie) and the pure indirect effect (pie). Pearl (2011a)
1 − de/te which is the same as tiete = tie/te) and the pure indirect effect
ratio to total effect (piete = pie/te), concluding (the values referred to are
enhancement alone.”
http://www.mii.ucla.edu/causality/wp-content/uploads/2011/09/grice.pdf
29
[Table 10 about here.]
An example that fulfills the design of Table 9 with 100 subjects in the
control group and 100 in the treatment group is shown in Table 13.
The Mplus input for a Bayes analysis of these data using probit is shown
in Appendix Section 14.6. The results are shown in Table 14. Bayesian
the posterior distribution for the ratio of the direct effect to the total effect
is shown in Figure 7.
30
8 Mediation modeling with a nominal
mediator
Mediation modeling with a nominal mediator has apparently not been
using their own car while commuting to work in favor of a van pool, bus,
Here again, the general formulas of Section 4 can be used. The formulas
rates for a count Y. Appendix Section 13.4 shows the causal effects for a
31
variable that is the same as the observed nominal M. In this case, the latent
The Y means change over the classes as the default. An interaction between
as before. The Mplus approach also allows for the nominal mediator to not
category. The Mplus input for Step 1 and Step 2 of the simulation are
shown in Section 14.7. The results are shown in Table 15, Table 16, and
Table 17. It is seen that the estimation performs very well. The direct
and indirect effects show good coverage. The Step 1 and Step 2 results
are slightly different due to latent class being unobserved in Step 1 and
observed in Step 2.
32
8.2 Example 4: Hypothetical pollution data with
The Mplus input for this analysis is shown in Appendix Section 14.8.
come
Causal effects using a count outcome are shown in Appendix Section 13.5.
the count variable can also be a mediator. A count outcome can also be
Mplus can handle Poisson, negative binomial, and inflation versions of those
class) versions.
Appendix Section 14.9 shows the Mplus input for a Monte Carlo
33
[Table 21 about here.]
analysis
As shown in the preceding sections, causally-derived direct and indirect
effects are not necessarily the same as SEM effects, particularly with non-
claim that effects are causal, however, it is not sufficient to simply use the
fulfilled for the effects to be causal and the plausibility of these assumptions
and Sobel (2008) is that the authors think many if not most applications
are not likely to fulfill such assumptions even in randomized studies. This
34
the two equations of the regular mediation model as indicated in Figure 9.
Including the residual covariance, however, makes the model not identified.
example of Section 6.5 is the variable poverty which may affect both the
Grade 5 aggression score mediator and the juvenile court record outcome.
are computed given different fixed values of the residual covariance. This
the latter, the approach can answer questions such as how large does your
sample and effects have to be for the lower confidence band on the indirect
effect to not include zero when allowing for a certain degree of mediator-
outcome confounding?
indicates that there is another way to estimate the mediation model. The
Monte Carlo study is performed to show that the same estimates of the
shows the results, verifying that the data-generating parameters are well
recovered.
35
[Figure 10 about here.]
Section 13.6 shows how the parameters of the Figure 10 model can be used
to derive indirect and direct effects under different assumptions for the
effect β1 γ1 is obtained as
p
β1 = σ/σ2 (ρ̃ − ρ (1 − ρ̃2 )/(1 − ρ2 )), (43)
where σ and σ2 are the standard deviations of the outcome and mediator
from the regression of M on X. Appendix Section 13.6 shows that the direct
effect β2 is obtained as
β2 = κ1 − β1 γ1 , (44)
Mplus input for a Monte Carlo study that generates data according to
Figure 9 with a residual correlation of 0.25. The indirect effect is 0.25 and
the direct effect is 0.4. The data are analyzed by the model of Figure 10
36
according to the appendix formulas while applying a fixed correlation of
ρ = 0.25, that is, the true correlation. Table 23 shows that the indirect
and direct effects (labeled ind and de) are correctly estimated with this
adjustment.
illustrate this. The correct value for the indirect effect is 0.25 (marked
The sensitivity analysis varies the ρ values from −0.9 to +0.9. A graph
indirect effect value of 0.25 is obtained. For lower ρ values the effect is
The graph provides useful information for planning new data collections.
At this sample size (n = 400) and effect size, the lower confidence limit does
not include zero until about ρ = 0.6. This means that a rather high degree
of confounding is needed for the effect to not be detected. Also, in the range
of ρ from about -0.1 to +0.4 the confidence interval covers the correct value
37
to the assumption of a normal parameter estimate distribution for the
intervals.
smoking
(hcirc0) and at 36 months (hcirc36). The key focus is on a binary risk factor
defined by the mother’s drinking and smoking during the third trimester
(alcccig).
at birth and 36 months are both directly affected by mother’s drinking and
smoking during pregnancy. That is, the growth rate in head circumference,
after the baby has left the womb, is affected by mother’s drinking and
38
smoking during pregnancy.
the mother’s behavior during pregnancy controlling for those variables. For
example, male babies tend to have a larger head circumference at birth than
female babies and males may also have a faster growth rate, hence impacting
both the mediator and the outcome. The baby’s gender is scored as 1 for
males and 0 for females, and baby’s ethnicity scored as 1 for blacks and 0
for others.
Figure 12. The Mplus input is given in Appendix Section 14.10.3. Table 24
product is the reported indirect effect. The results indicate that mother’s
at birth, having an indirect effect also three years later, but having no
39
of potential omitted mediator-outcome confounders. There are presumably
Figure 13 shows the results of the sensitivity analysis. The data for
the graph are produced by a series of analyses using the Mplus input in
The figure shows that if the residual correlation ρ is less than about 0.4,
the negative indirect effect is still bounded away from zero. A residual
this case.
(see (44). Figure 14 shows that the direct effect is not significantly different
from zero in the range of ρ from -0.3 to 0.75. Assuming that the residual
correlation falls somewhere in this wide range, a direct effect is not detected.
often seen in practice. This section lists a few of the generalizations and
40
outlines how the causally-defined effects come into play in these models.
the aggressive behavior example of Section 6.5, the Grade 1 Fall aggression
score may serve as a moderator in that initially more aggressive boys are
somewhat more likely to benefit from the intervention. This is often referred
to as treatment-baseline interaction.
yi = β0 + β1 mi + β2 xi + β3 xi zi + 1i , (45)
mi = γ0 + γ1 xi + γ2 zi + γ3 xi zi + 2i , (46)
Applying the Appendix Section 13.1 formulas, it follows that the direct and
DE = β2 + β3 z, (47)
41
For a binary moderator, multiple-group SEM gives a flexible approach.
Again using the aggressive behavior example, females have less of an effect of
the intervention than boys. The multiple-group approach can estimate the
same parameters as in (45) and (46), leading to the same effect definitions,
In a more general setting, latent variables may often play the roles of
variables.
example, the causal effects for an ordinal outcome can be expressed by the
outcome may be the response tendency, where the observed categories are
42
merely crude categorizations of this tendency. The choice decides if the
11.2.2 Factors
mediator fm and the continuous latent outcome fy, that is, the usual
estimation.
43
assumptions are needed for causally-defined effects. Key references include
12 Conclusions
This paper summarizes some of the literature on causal effects in mediation
analysis. Applications are shown where the effects are estimated using
SEM practice, where causal effects have been considered only in the
effects are computed also for mediators and outcomes that are binary,
out using Mplus. This can be used both in planning a new study and in
which implies that the effects found are causal. The causal effects literature
that more often only approximations to causal findings are obtained. In this
claimed.
44
the analysis, namely that the mediator is not randomized. To avoid this,
and crossover designs; see, e.g., Bullock et al. (2010) and Imai et al (2011).
These designs, however, come with their own challenges and assumptions
45
References
[1] Baron, R.M. & Kenny, D.A. (1986). The moderator-mediator variable
51, 11731182.
[3] Bullock, J.G., Green, D.P. & Ha, S.E. (2010). Yes, but what’s the
Press.
[6] Goldberger, A.S. & Duncan, O.D. (1973). Structural equation models
61
observational data. Journal of the American Statistical Association, 101,
901-910.
[9] Imai, K., Keele, L., & Tingley, D. (2010a). A general approach to causal
[10] Imai, K., Keele, L., & Yamamoto, Y. (2010b). Identification, inference
25, 51-71.
[11] Imai, K., Keele, L., Tingley, D., & Yamamoto, T. (2010c). Advances
[12] Imai. K., Tingley, D., & Yamamoto, T. (2011). Experimental designs
[13] James, L.R. & Brett, J. M. (1984). Mediators, moderators, and tests
[14] Jöreskog, K.G. & Sörbom, D. (1979). Advances in factor analysis and
[15] Judd, C.M. & Kenny, D.A. (1981). Process analysis: estimating
[16] Kraemer, H.K., Kiernan, M., Essex, M. & Kupfer, D.J. (2008). How
and why criteria defining moderators and mediators differ between the
S101-S108.
62
[17] Lindquist, M.A. & Sobel M.E. (2010). Graphical models, potential
[18] Lindquist, M.A. & Sobel M.E. (2011). Cloak and DAG: A response to
[19] MacKinnon, D.P., Lockwood, C.M., Brown, C.H., Wang, W., &
[24] Muthén, B., Brown, C.H., Masyn, K., Jo, B., Khoo, S.T., Yang, C.C.,
Wang, C.P., Kellam, S., Carlin, J., & Liao, J. (2002). General growth
3, 459-475.
[25] Muthén, L.K. & Muthén, B.O. (2002). How to use a Monte Carlo
63
Modeling, 4, 599-620.
www.statmodel.com.
Science.
and Applications.
[33] Preacher, K.J., Rucker, D.D. & Hayes, A.F. (2007). Addressing
[34] Robins, J.M. (2003). Semantics of causal DAG models and the
64
Stochastic Systems, Eds. P. Green, N.L. Hjort, & S. Richardson, Oxford
[37] Valeri, L. & VanderWeele, T.J. (2011). Extending the Baron and
[38] VanderWeele, T.J. (2010a). Bias formulas for sensitivity analysis for
Interface, 2, 457-468.
172(12):13391348.
[42] Winship, C. & Mare, R.D. (1983). Structural equations and path
65
List of Figures
1 A mediation model with treatment-mediator interaction. The filled
circle represents an interaction term consisting of the variables
connected to it without arrow heads, in this case x and m. . . . . 67
2 Latent response variable m∗ behind a three-category ordinal vari-
able m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3 Bayes posterior distribution for the direct effect odds ratio . . . . 69
4 Bayes posterior distribution for the total indirect effect odds ratio 70
5 A mediation model for aggressive behavior and juvenile court outcome 71
6 A mediation model for intentions to stop smoking . . . . . . . . . 72
7 Bayes posterior distribution for the ratio of the direct effect to the
total effect for n=200 data based on Pearl . . . . . . . . . . . . . 73
8 Mediator-outcome confounding 1 . . . . . . . . . . . . . . . . . . 74
9 Mediator-outcome confounding 2 . . . . . . . . . . . . . . . . . . 75
10 Mediator-outcome confounding 3 . . . . . . . . . . . . . . . . . . 76
11 Indirect effect based on sensitivity analysis with ρ varying from -0.9
to +0.9 and true residual correlation 0.25 . . . . . . . . . . . . . . 77
12 Mediation model for mother’s drinking and smoking related to
child’s head circumference . . . . . . . . . . . . . . . . . . . . . . 78
13 Sensitivity analysis for indirect effect of head circumference example 79
14 Sensitivity analysis for direct effect of head circumference example 80
15 Z moderating the effect of X on M and Y . . . . . . . . . . . . . . 81
16 Continuous latent factors as mediator and outcome . . . . . . . . 82
17 Latent class variable as mediator . . . . . . . . . . . . . . . . . . 83
66
Figure 1: A mediation model with treatment-mediator interaction. The filled
circle represents an interaction term consisting of the variables connected to it
without arrow heads, in this case x and m.
67
Figure 2: Latent response variable m∗ behind a three-category ordinal variable m
68
Figure 3: Bayes posterior distribution for the direct effect odds ratio
69
Figure 4: Bayes posterior distribution for the total indirect effect odds ratio
70
Figure 5: A mediation model for aggressive behavior and juvenile court outcome
71
Figure 6: A mediation model for intentions to stop smoking
72
Figure 7: Bayes posterior distribution for the ratio of the direct effect to the total
effect for n=200 data based on Pearl
73
Figure 8: Mediator-outcome confounding 1
74
Figure 9: Mediator-outcome confounding 2
75
Figure 10: Mediator-outcome confounding 3
76
Figure 11: Indirect effect based on sensitivity analysis with ρ varying from -0.9 to
+0.9 and true residual correlation 0.25
Indirect effect
1.6
1.4
1.2
.8
.6
.4
.2
ρ
−.4
−.6
77
Figure 12: Mediation model for mother’s drinking and smoking related to child’s
head circumference
78
Figure 13: Sensitivity analysis for indirect effect of head circumference example
Indirect effect
.75
.5
.25
ρ
−.5
−.75
−1
−1.25
−1.5
79
Figure 14: Sensitivity analysis for direct effect of head circumference example
Direct effect
1.2
.8
.6
.4
.2
ρ
−.4
−.6
−.8
−1
−1.2
80
Figure 15: Z moderating the effect of X on M and Y
81
Figure 16: Continuous latent factors as mediator and outcome
82
Figure 17: Latent class variable as mediator
83
List of Tables
1 Output for continuous mediator, continuous outcome with treatment-
mediator interaction, Step 2 . . . . . . . . . . . . . . . . . . . . . 87
2 Output for Monte Carlo simulation with a binary outcome and a
continuous mediator, n = 200, Step 2, ML . . . . . . . . . . . . . 88
3 Output for Monte Carlo simulation with a binary outcome and a
continuous mediator, n = 200, Step 2, Bayes . . . . . . . . . . . . 89
4 Output for aggressive behavior and juvenile court record using probit 90
5 Output for aggressive behavior and juvenile court record using logit 91
6 Intentions to stop smoking data (Source: MacKinnon et al., 2007,
Clinical Trials, 4, p. 510) . . . . . . . . . . . . . . . . . . . . . . . 92
7 Output for intentions to stop smoking using probit with the
mediator treated as an observed continuous variable using ML . . 93
8 Output for intentions to stop smoking using probit with the
mediator treated as a latent continuous variable using WLSMV . 94
9 Pearl’s hypothetical binary case (Source: Pearl, 2010, 2011) . . . . 95
10 Output for Pearl’s hypothetical binary case using logit with ML,
Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
11 Output for Pearl’s hypothetical binary case using probit with ML,
Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12 Output for Pearl’s hypothetical binary case using probit with
Bayes, Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
13 Pearl data n=200 . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
14 Output for n=200 data based on the Pearl example . . . . . . . . 100
15 Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 1 . . . . . . . . . . . . . . . . . . . . . 101
16 Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 2, part 1 . . . . . . . . . . . . . . . . . 102
17 Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 2, part 2 . . . . . . . . . . . . . . . . . 103
18 Hypothetical pollution data with a nominal mediator and a binary
outcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
19 Output for hypothetical pollution data with a nominal mediator
and a binary outcome, part 1 . . . . . . . . . . . . . . . . . . . . 105
20 Output for hypothetical pollution data with a nominal mediator
and a binary outcome, part 2 . . . . . . . . . . . . . . . . . . . . 106
21 Output for mediation modeling with a count outcome, Step 2 . . 107
22 Output for Monte Carlo simulation, analyzing by M and Y
regressed on X only . . . . . . . . . . . . . . . . . . . . . . . . . . 108
84
23 Output for generating data with true residual correlation 0.25 and
analyzing data with Imai’s ρ fixed at the true value 0.25 . . . . . 109
24 Output for head circumference analysis using the Imai et al.
sensitivity approach with ρ = 0 . . . . . . . . . . . . . . . . . . . 110
25 Input for step 1 y on xm . . . . . . . . . . . . . . . . . . . . . . . 111
26 Input for step 2 y on xm . . . . . . . . . . . . . . . . . . . . . . . 112
27 Input for step 1 ML y on xm n=200 . . . . . . . . . . . . . . . . . 113
28 Input for step 2 ML y on xm n=200 . . . . . . . . . . . . . . . . . 114
29 Input excerpts for step 2 bayes y on xm n=200 . . . . . . . . . . . 115
30 Input for 1st rep step 2 bayes y on xm n=200 . . . . . . . . . . . 116
31 Input excerpts for juvcrt on agg5 on tx agg1 tx-agg5 probit . . . . 117
32 Input for juvcrt on agg5 on tx agg1 tx-agg5 probit, continued . . 118
33 Input for juvcrt on agg5 on tx agg1 tx-agg5 logit . . . . . . . . . . 119
34 Input for m cont probit using maximum-likelihood . . . . . . . . . 120
35 Input for m* cont probit using weighted least-squares . . . . . . . 121
36 Input for step 1 binary m binary y logit with xm interaction pearl
ex n=400 tie and pie . . . . . . . . . . . . . . . . . . . . . . . . . 122
37 Input for step 1 binary m binary y logit with xm interaction pearl
ex n=400 tie and pie, continued . . . . . . . . . . . . . . . . . . . 123
38 Input for step 2 define xm binary m binary y logit with xm
interaction pearl ex n=400 tie and pie . . . . . . . . . . . . . . . . 124
39 Input for step 1 binary m binary y probit with xm interaction pearl
ex n=400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
40 Input for step 1 binary m binary y probit with xm interaction pearl
ex n=400, continued . . . . . . . . . . . . . . . . . . . . . . . . . 126
41 Input for step 2 ml define xm binary m binary y probit with xm
interaction pearl ex n=400 . . . . . . . . . . . . . . . . . . . . . . 127
42 Input for step 2 bayes define xm binary m binary probit with xm
interaction pearl ex n=400 10k . . . . . . . . . . . . . . . . . . . 128
43 Input for step 2 bayes define xm binary m binary probit with xm
interaction pearl ex n=400 10k, continued . . . . . . . . . . . . . 129
44 Input for Bayes analysis of n=200 data drawn on the Pearl example 130
45 Input for Bayes analysis of n=200 data drawn on the Pearl example,
continued . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
46 Input for step 1 y on xm n=800 . . . . . . . . . . . . . . . . . . . 132
47 Input for step 1 y on xm n=800, continued . . . . . . . . . . . . . 133
48 Input for step 2 y on xm knownclass . . . . . . . . . . . . . . . . 134
49 Input for step 2 y on xm knownclass, continued . . . . . . . . . . 135
50 Input for hypothetical pollution data with a nominal mediator and
a binary outcome . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
85
51 Input for hypothetical pollution data with a nominal mediator and
a binary outcome, continued . . . . . . . . . . . . . . . . . . . . . 137
52 Input for step 1 count y on xm . . . . . . . . . . . . . . . . . . . 138
53 Input for step 1 count y on xm, continued . . . . . . . . . . . . . 139
54 Input for step 2 count y on xm . . . . . . . . . . . . . . . . . . . 140
55 Input for rho=0 run: replicating regular mediation analysis . . . . 141
56 Input for true corr=0.25, rho=0.25 . . . . . . . . . . . . . . . . . 142
57 Input excerpts for head circumference analysis with rho=0 corre-
sponding to regular mediation analysis . . . . . . . . . . . . . . . 143
86
Table 1: Output for continuous mediator, continuous outcome with treatment-
mediator interaction, Step 2
y ON
x 0.400 0.4011 0.1784 0.1761 0.0318 0.950 0.616
xm 0.000 0.2006 0.0716 0.0711 0.0051 0.958 0.780
m 0.500 0.5006 0.0493 0.0501 0.0024 0.964 1.000
m ON
x 0.500 0.5015 0.0981 0.0997 0.0096 0.940 0.998
Intercepts
y 1.000 0.9984 0.1107 0.1122 0.0122 0.954 1.000
m 2.000 2.0032 0.0683 0.0705 0.0047 0.962 1.000
Residual variances
y 0.500 0.4974 0.0372 0.0352 0.0014 0.936 1.000
m 1.000 0.9933 0.0667 0.0702 0.0045 0.960 1.000
New/additional parameters
tie 0.350 0.3518 0.0748 0.0745 0.0056 0.932 0.998
pie 0.250 0.2509 0.0544 0.0561 0.0029 0.950 0.998
de 0.800 0.8027 0.0802 0.0766 0.0064 0.936 1.000
87
Table 2: Output for Monte Carlo simulation with a binary outcome and a
continuous mediator, n = 200, Step 2, ML
y ON
x 0.300 0.2740 0.2796 0.2770 0.0787 0.952 0.194
m 0.700 0.7138 0.1848 0.1799 0.0343 0.956 0.990
xm 0.200 0.2370 0.2865 0.2842 0.0833 0.954 0.110
m ON
x 0.500 0.4894 0.1207 0.1223 0.0146 0.942 0.972
Intercepts
m 0.500 0.5044 0.0863 0.0861 0.0074 0.970 1.000
Thresholds
y$1 0.500 0.5058 0.1670 0.1672 0.0279 0.952 0.880
Residual variances
m 0.750 0.7465 0.0808 0.0746 0.0065 0.920 1.000
New/additional parameters
ind 0.450 0.4661 0.1621 0.1600 0.0265 0.948 0.950
dir 0.450 0.3935 0.2140 0.2122 0.0458 0.952 0.462
arg11 0.700 0.7134 0.1858 0.1819 0.0346 0.962 0.992
arg10 0.250 0.2473 0.1846 0.1807 0.0340 0.950 0.304
arg01 0.200 0.2037 0.1788 0.1699 0.0319 0.942 0.218
arg00 -0.150 -0.1462 0.1546 0.1489 0.0239 0.948 0.188
v1 1.607 1.7107 0.3486 0.3263 0.1319 0.948 1.000
v0 1.367 1.4057 0.2238 0.1998 0.0515 0.942 1.000
probit11 0.552 0.5484 0.1317 0.1327 0.0173 0.952 0.992
probit10 0.197 0.1948 0.1468 0.1442 0.0215 0.946 0.260
probit01 0.171 0.1678 0.1437 0.1383 0.0206 0.942 0.240
probit00 -0.128 -0.1244 0.1315 0.1256 0.0173 0.952 0.190
tie 0.131 0.1303 0.0391 0.0388 0.0015 0.946 0.958
de 0.129 0.1255 0.0689 0.0676 0.0047 0.952 0.450
pie 0.119 0.1151 0.0358 0.0632 0.0013 0.936 0.950
88
Table 3: Output for Monte Carlo simulation with a binary outcome and a
continuous mediator, n = 200, Step 2, Bayes
y ON
x 0.300 0.2677 0.2760 0.2762 0.0771 0.954 0.188
m 0.700 0.7126 0.1830 0.1812 0.0336 0.950 0.990
xm 0.200 0.2513 0.2841 0.2869 0.0832 0.958 0.128
m ON
x 0.500 0.4897 0.1207 0.1240 0.0147 0.946 0.968
Intercepts
m 0.500 0.5044 0.0863 0.0875 0.0075 0.972 1.000
Thresholds
y$1 0.500 0.5062 0.1655 0.1656 0.0274 0.950 0.886
Residual variances
m 0.750 0.7650 0.0828 0.0777 0.0071 0.926 1.000
New/additional parameters
ind 0.450 0.4616 0.1629 0.1664 0.0266 0.956 0.966
dir 0.400 0.3961 0.2133 0.2134 0.0454 0.956 0.452
arg11 0.700 0.7204 0.1879 0.1851 0.0357 0.946 0.992
arg10 0.250 0.2510 0.1851 0.1818 0.0342 0.944 0.296
arg01 0.200 0.2012 0.1785 0.1714 0.0318 0.940 0.234
arg00 -0.150 -0.1460 0.1544 0.1500 0.0238 0.946 0.194
v1 1.607 1.7456 0.3648 0.3644 0.1519 0.940 1.000
v0 1.367 1.4134 0.2252 0.2157 0.0527 0.954 1.000
probit11 0.552 0.5465 0.1305 0.1312 0.0170 0.952 0.992
probit10 0.197 0.1949 0.1451 0.1421 0.0210 0.946 0.296
probit01 0.171 0.1645 0.1427 0.1376 0.0204 0.940 0.234
probit00 -0.128 -0.1234 0.1305 0.1250 0.0170 0.946 0.194
tie 0.131 0.1266 0.0385 0.0387 0.0015 0.950 0.966
de 0.129 0.1245 0.0673 0.0665 0.0045 0.954 0.468
pie 0.119 0.1106 0.0352 0.0363 0.0013 0.956 0.960
ortie 1.779 1.7858 0.3050 0.3211 0.0929 0.944 1.000
orde 1.681 1.7321 0.4935 0.5272 0.2457 0.956 1.000
orpie 1.614 1.5914 0.2379 0.2553 0.0570 0.958 1.000
89
Table 4: Output for aggressive behavior and juvenile court record using probit
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-Value
juvcrt ON
tx 0.003 0.192 0.013 0.990
agg5 0.451 0.103 4.374 0.000
xm 0.263 0.231 1.140 0.254
agg1 -0.003 0.096 -0.036 0.972
agg5 ON
tx -0.267 0.115 -2.325 0.020
agg1 0.462 0.060 7.730 0.000
Intercepts
agg5 0.074 0.070 1.054 0.292
Thresholds
juvcrt$1 -0.035 0.097 -0.364 0.716
Residual variances
agg5 0.787 0.074 10.706 0.000
New/additional parameters
ind -0.191 0.096 -1.983 0.047
dir 0.022 0.197 0.111 0.911
arg11 -0.100 0.174 -0.576 0.565
arg10 0.090 0.176 0.514 0.607
arg00 0.069 0.102 0.672 0.502
v1 1.401 0.247 5.664 0.000
v0 1.160 0.076 15.310 0.000
probit11 -0.085 0.147 -0.574 0.566
probit10 0.076 0.147 0.521 0.602
probit00 0.064 0.095 0.673 0.501
indirect -0.064 0.030 -2.158 0.031
direct 0.005 0.067 0.076 0.940
orind 0.773 0.092 8.371 0.000
ordir 1.021 0.275 3.714 0.000
90
Table 5: Output for aggressive behavior and juvenile court record using logit
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-Value
juvcrt ON
tx 0.002 0.316 0.006 0.995
agg5 0.726 0.171 4.237 0.000
xm 0.431 0.393 1.096 0.273
agg1 0.000 0.159 -0.002 0.998
agg5 ON
tx -0.267 0.115 -2.325 0.020
agg1 0.462 0.060 7.730 0.000
Intercepts
agg5 0.074 0.070 1.054 0.292
Thresholds
juvcrt$1 -0.059 0.160 -0.366 0.714
Residual variances
agg5 0.787 0.074 10.706 0.000
New/additional parameters
ind -0.309 0.158 -1.957 0.050
dir 0.034 0.325 0.103 0.918
oddsrat 0.734 0.116 6.334 0.000
91
Table 6: Intentions to stop smoking data (Source: MacKinnon et al., 2007, Clinical
Trials, 4, p. 510)
Cigarette use
Intention No Use Use Total
4 (Yes) 9 20 29
3 (Probably) 14 20 34
Ctrl
2 (Don’t think so) 36 13 49
1 (No) 229 30 259
4 (Yes) 9 19 28
3 (Probably) 15 11 26
Tx
2 (Don’t think so) 43 11 54
1 (No) 353 32 385
92
Table 7: Output for intentions to stop smoking using probit with the mediator
treated as an observed continuous variable using ML
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-Value
ciguse ON
tx -0.203 0.109 -1.867 0.062
intent 0.538 0.048 11.227 0.000
intent ON
tx -0.186 0.070 -2.664 0.008
Intercepts
intent 0.106 0.056 1.906 0.057
Thresholds
ciguse$1 0.912 0.080 11.432 0.000
Residual variances
intent 0.990 0.069 14.291 0.000
New/additional parameters
ind -0.100 0.038 -2.602 0.009
dir -0.203 0.109 -1.867 0.062
arg11 -1.158 0.079 -14.579 0.000
arg10 -1.058 0.081 -13.072 0.000
arg00 -0.855 0.085 -10.105 0.000
v1 1.287 0.055 23.545 0.000
v0 1.287 0.055 23.545 0.000
probit11 -1.021 0.072 -14.240 0.000
probit10 -0.933 0.075 -12.514 0.000
probit00 -0.754 0.076 -9.947 0.000
indirect -0.022 0.009 -2.548 0.011
direct -0.050 0.027 -1.853 0.064
orind 0.853 0.051 16.587 0.000
ordir 0.731 0.123 5.941 0.000
93
Table 8: Output for intentions to stop smoking using probit with the mediator
treated as a latent continuous variable using WLSMV
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-Value
ciguse ON
tx -0.131 0.093 -1.409 0.159
intent 0.631 0.042 15.114 0.000
intent ON
tx -0.246 0.089 -2.756 0.006
Thresholds
ciguse$1 0.760 0.072 10.496 0.000
intent$1 0.525 0.067 7.849 0.000
intent$2 0.970 0.071 13.581 0.000
intent$3 1.378 0.082 16.721 0.000
New/additional parameters
ind -0.155 0.057 -2.711 0.007
dir -0.131 0.093 -1.409 0.159
arg11 -1.045 0.069 -15.102 0.000
arg10 -0.890 0.078 -11.443 0.000
arg00 -0.760 0.072 -10.496 0.000
v1 1.398 0.053 26.557 0.000
v0 1.398 0.053 26.557 0.000
probit11 -0.884 0.062 -14.195 0.000
probit10 -0.753 0.070 -10.727 0.000
probit00 -0.643 0.063 -10.189 0.000
indirect -0.037 0.014 -2.645 0.008
direct -0.035 0.024 -1.410 0.158
orind 0.796 0.066 12.037 0.000
ordir 0.829 0.111 7.454 0.000
94
Table 9: Pearl’s hypothetical binary case (Source: Pearl, 2010, 2011)
1 1 FY (1, 1) = 80%
1 0 FY (1, 0) = 40%
0 1 FY (0, 1) = 30%
0 0 FY (0, 0) = 20%
Treatment Percentage
X M=1
0 FM (0) = 40%
1 FM (1) = 75%
95
Table 10: Output for Pearl’s hypothetical binary case using logit with ML, Step
2
m ON
x 1.504 1.5144 0.2193 0.2191 0.0481 0.964 1.000
y ON
x 0.981 1.0020 0.3741 0.3745 0.1401 0.958 0.774
m 0.539 0.5405 0.3446 0.3399 0.1185 0.952 0.340
xm 1.253 1.2701 0.4816 0.4953 0.2318 0.968 0.750
Thresholds
y$1 1.386 1.4085 0.2366 0.2315 0.0564 0.962 1.000
m$1 0.405 0.4136 0.1423 0.1449 0.0203 0.948 0.822
New/additional parameters
fm0 0.400 0.3986 0.0338 0.0346 0.0011 0.940 1.000
fm1 0.750 0.7490 0.0318 0.0306 0.0010 0.938 1.000
fy00 0.200 0.1991 0.0363 0.0362 0.0013 0.950 1.000
fy10 0.400 0.4018 0.0692 0.0690 0.0048 0.954 1.000
fy01 0.300 0.2981 0.0489 0.0510 0.0024 0.954 1.000
fy11 0.800 0.8009 0.0312 0.0325 0.0010 0.956 1.000
de 0.320 0.3222 0.0543 0.0539 0.0030 0.944 1.000
pie 0.035 0.0348 0.0229 0.0227 0.0005 0.950 0.296
tie 0.140 0.1399 0.0329 0.0329 0.0011 0.940 1.000
te 0.460 0.4621 0.0435 0.0442 0.0019 0.950 1.000
iete 0.070 0.0761 0.0501 0.0505 0.0025 0.962 0.272
dete 0.696 0.6945 0.0778 0.0762 0.0060 0.938 1.000
compdete 0.304 0.3055 0.0778 0.0762 0.0060 0.938 1.000
tiete 0.304 0.3055 0.0778 0.0762 0.0060 0.938 1.000
96
Table 11: Output for Pearl’s hypothetical binary case using probit with ML, Step
2
m ON
x 0.929 0.9341 0.1321 0.1321 0.0174 0.962 1.000
y ON
x 0.586 0.5973 0.2242 0.2244 0.0503 0.958 0.766
m 0.315 0.3148 0.2008 0.1990 0.0402 0.952 0.336
xm 0.779 0.7866 0.2857 0.2943 0.0815 0.968 0.794
Thresholds
y$1 0.840 0.8506 0.1339 0.1315 0.0180 0.956 1.000
m$1 0.254 0.2588 0.0883 0.0899 0.0078 0.0946 0.824
New/additional parameters
de 0.320 0.3216 0.0543 0.0539 0.0029 0.946 1.000
tie 0.140 0.1399 0.0329 0.0329 0.0011 0.938 1.000
pie 0.035 0.0347 0.0229 0.0227 0.0005 0.950 0.294
te 0.460 0.4615 0.0434 0.0442 0.0019 0.950 1.000
tiete 0.304 0.3060 0.0780 0.0764 0.0061 0.942 1.000
piete 0.070 0.0758 0.0501 0.0506 0.0025 0.964 0.272
dete 0.696 0.6940 0.0780 0.0764 0.0061 0.942 1.000
compdete 0.304 0.3060 0.0780 0.0764 0.0061 0.942 1.000
pfm0 0.400 0.3983 0.0339 0.0345 0.0011 0.940 1.000
pfm1 0.750 0.7492 0.0319 0.0306 0.0010 0.938 1.000
pfy00 0.200 0.1996 0.0364 0.0363 0.0013 0.950 1.000
pfy10 0.400 0.4017 0.0692 0.0690 0.0048 0.954 1.000
pfy01 0.300 0.2980 0.0488 0.0511 0.0024 0.956 1.000
pfy11 0.800 0.8003 0.0312 0.0326 0.0010 0.956 1.000
97
Table 12: Output for Pearl’s hypothetical binary case using probit with Bayes,
Step 2
m ON
x 0.929 0.9334 0.1318 0.1310 0.0174 0.958 1.000
y ON
x 0.586 0.5963 0.2204 0.2241 0.0486 0.958 0.772
m 0.315 0.3110 0.1976 0.1993 0.0390 0.954 0.330
xm 0.779 0.7916 0.2792 0.2919 0.0780 0.970 0.808
Thresholds
y$1 0.840 0.8481 0.1320 0.1308 0.0175 0.952 1.000
m$1 0.254 0.2581 0.0881 0.0894 0.0078 0.946 0.824
New/additional parameters
de 0.320 0.3208 0.0536 0.0537 0.0029 0.956 1.000
tie 0.140 0.1371 0.0323 0.0324 0.0011 0.946 1.000
pie 0.035 0.0334 0.0221 0.0227 0.0005 0.958 0.330
te 0.460 0.4598 0.0431 0.0441 0.0019 0.958 1.000
tiete 0.304 0.3027 0.0773 0.0770 0.0060 0.946 0.330
piete 0.070 0.0735 0.0488 0.0518 0.0024 0.956 1.000
dete 0.696 0.6972 0.0773 0.0770 0.0060 0.946 1.000
compdete 0.304 0.3027 0.0773 0.0770 0.0060 0.946 1.000
orde 4.030 4.2200 1.0343 1.1117 1.1036 0.950 1.000
ortie 1.833 1.8375 0.2559 0.2614 0.0654 0.954 1.000
pfm0 0.500 0.3986 0.0338 0.0342 0.0114 0.176 1.000
pfm1 0.500 0.7492 0.0319 0.0303 0.0631 0.000 1.000
pfy00 0.500 0.2002 0.0360 0.0361 0.0912 0.000 1.000
pfy10 0.500 0.4021 0.0688 0.0681 0.0143 0.712 1.000
pfy01 0.500 0.2974 0.0485 0.0507 0.0434 0.034 1.000
pfy11 0.500 0.8008 0.0312 0.0319 0.0915 0.000 1.000
numde 0.500 0.5614 0.0461 0.0453 0.0059 0.730 1.000
dende 0.500 0.2400 0.0288 0.0299 0.0684 0.000 1.000
numtie 0.500 0.7008 0.0319 0.0320 0.0413 0.000 1.000
dentie 0.500 0.5614 0.0461 0.0453 0.0059 0.730 1.000
98
Table 13: Pearl data n=200
X M Y
Total
Not Cured Cured
Enzyme Absent 48 12 60
Ctrl
Enzyme Present 28 12 40
Enzyme Absent 15 10 25
Tx
Enzyme Present 15 60 75
99
Table 14: Output for n=200 data based on the Pearl example
m ON
x 0.960 0.187 0.000 0.598 1.325
y ON
x 0.596 0.314 0.031 -0.030 1.212
m 0.328 0.259 0.103 -0.179 0.843
xm 0.757 0.406 0.031 -0.030 1.553
Thresholds
y$1 0.709 0.170 0.000 0.378 1.051
m$1 0.232 0.122 0.028 -0.005 0.469
New/additional parameters
de 0.322 0.077 0.000 0.168 0.470
tie 0.131 0.046 0.000 0.051 0.231
pie 0.038 0.033 0.103 -0.021 0.111
te 0.456 0.061 0.000 0.332 0.569
tiete 0.288 0.113 0.000 0.109 0.547
piete 0.084 0.076 0.103 -0.047 0.258
dete 0.712 0.113 0.000 0.453 0.891
compdete 0.288 0.113 0.000 0.109 0.547
pfm0 0.408 0.047 0.000 0.319 0.502
pfm1 0.767 0.043 0.000 0.674 0.844
pfy00 0.239 0.052 0.000 0.147 0.353
pfy10 0.455 0.102 0.000 0.259 0.658
pfy01 0.351 0.071 0.000 0.221 0.497
pfy11 0.834 0.044 0.000 0.735 0.906
numde 0.609 0.066 0.000 0.477 0.736
dende 0.285 0.043 0.000 0.208 0.376
orde 3.908 1.508 0.000 2.024 7.852
numind 0.744 0.045 0.000 0.649 0.825
denind 0.609 0.066 0.000 0.477 0.736
orind 1.841 0.398 0.000 1.290 2.831
100
Table 15: Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 1
Latent class 1
y ON
x -0.500 -0.4884 0.2647 0.2461 0.0701 0.936 0.546
Intercepts
y -2.000 -2.0254 0.2186 0.2050 0.0483 0.946 0.998
Residual variances
y 0.750 0.7420 0.0776 0.0739 0.0061 0.920 1.000
Latent class 2
y ON
x -0.300 -0.3037 0.3664 0.3472 0.1340 0.934 0.180
Intercepts
y 0.000 0.0107 0.2900 0.2651 0.0840 0.918 0.082
Residual variances
y 0.750 0.7420 0.0776 0.0739 0.0061 0.920 1.000
Latent class 3
y ON
x -0.200 -0.2000 0.1675 0.1609 0.0280 0.938 0.254
Intercepts
y 2.000 2.0155 0.1260 0.1173 0.0161 0.938 1.000
Residual variances
y 0.750 0.7420 0.0776 0.739 0.0061 0.920 1.000
Categorical latent variables
c#1 ON
x 0.700 0.7059 0.4183 0.3374 0.1746 0.950 0.526
c#2 ON
101
x 0.300 0.2761 0.3466 0.3321 0.1205 0.944 0.134
Intercepts
c#1 -1.000 -1.0041 0.3520 0.3067 0.1237 0.956 0.900
c#2 -0.500 -0.4559 0.2599 0.2513 0.0694 0.956 0.512
Table 16: Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 2, part 1
Latent class 1
y ON
x -0.500 -0.5045 0.1332 0.1285 0.0177 0.944 0.972
Intercepts
y -2.000 -2.0007 0.1011 0.1001 0.0102 0.958 1.000
Residual variances
y 0.750 0.7465 0.0360 0.0373 0.0013 0.954 1.000
Latent class 2
y ON
x -0.300 -0.2976 0.1125 0.1093 0.0126 0.942 0.772
Intercepts
y 0.000 0.0021 0.0799 0.0780 0.0064 0.944 0.056
Thresholds
Residual variances
y 0.750 0.7465 0.0360 0.0373 0.0013 0.954 1.000
Latent class 3
y ON
x -0.200 -0.1948 0.0917 0.0923 0.0084 0.954 0.554
Intercepts
y 2.000 2.0002 0.0629 0.0609 0.0039 0.936 1.000
Residual variances
y 0.750 0.7465 0.0360 0.0373 0.0013 0.954 1.000
102
Table 17: Output for Monte Carlo simulation of a nominal mediator and a
continuous outcome, Step 2, part 2
103
Table 18: Hypothetical pollution data with a nominal mediator and a binary
outcome
X M Y Total
0 1 %
1 30 30 50 60
Ctrl 2 20 60 75 80
3 20 80 70 100
1 50 30 38 80
Tx 2 40 60 60 100
3 20 40 68 60
104
Table 19: Output for hypothetical pollution data with a nominal mediator and a
binary outcome, part 1
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-value
Latent class 1
y ON
x -0.511 0.346 -1.475 0.140
Thresholds
y$1 0.000 0.258 0.000 1.000
Latent class 2
y ON
x -0.693 0.329 -2.106 0.035
Thresholds
y$1 -1.099 0.258 -4.255 0.000
Latent class 3
y ON
x -0.693 0.371 -1.869 0.062
Thresholds
y$1 -1.386 0.250 -5.545 0.000
105
Table 20: Output for hypothetical pollution data with a nominal mediator and a
binary outcome, part 2
Two-Tailed
Parameter Estimates S.E. Est./S.E. P-value
106
Table 21: Output for mediation modeling with a count outcome, Step 2
y ON
x 0.300 0.3042 0.1743 0.1691 0.0303 0.936 0.432
m 0.400 0.4051 0.1042 0.1036 0.0109 0.946 0.964
xm 0.200 0.2004 0.1258 0.1251 0.0158 0.952 0.394
m ON
x 0.500 0.5016 0.0852 0.0863 0.0072 0.954 1.000
Intercepts
m 0.500 0.4999 0.0612 0.0611 0.0037 0.948 1.000
u -0.700 -0.7123 0.1226 0.1213 0.0152 0.956 1.000
Residual variances
m 0.750 0.7431 0.0490 0.0525 0.0024 0.960 1.000
New/additional parameters
ind 0.450 0.3036 0.0608 0.0632 0.0251 0.374 1.000
dir 0.400 0.4047 0.1323 0.1308 0.0175 0.942 0.860
ey1 0.670 0.6693 0.0759 0.0783 0.0057 0.952 1.000
ey0 0.497 0.4942 0.0600 0.0595 0.0036 0.956 1.000
mum1 1.000 1.0015 0.0639 0.0609 0.0041 0.936 1.000
mum0 0.500 0.4999 0.0612 0.0611 0.0037 0.948 1.000
ay1 0.900 0.8955 0.1111 0.1216 0.0123 0.960 1.000
ay0 0.600 0.6011 0.1571 0.1597 0.0246 0.956 0.958
bym11 1.450 1.4509 0.0628 0.0671 0.0039 0.962 1.000
bym10 1.900 1.9130 0.1582 0.1695 0.0251 0.964 1.000
bym01 1.300 1.3012 0.0807 0.0823 0.0065 0.956 1.000
bym00 1.600 1.6113 0.1834 0.1810 0.0337 0.950 1.000
eym11 2.086 2.1154 0.2193 0.2299 0.0489 0.956 1.000
eym10 1.545 1.5575 0.1154 0.1199 0.0134 0.960 1.000
eym01 1.584 1.6165 0.2251 0.2244 0.0516 0.952 1.000
eym00 1.297 1.3108 0.1120 0.1148 0.0127 0.946 1.000
tie 0.336 0.3668 0.0756 0.0773 0.0066 0.956 1.000
de 0.392 0.3930 0.0945 0.0948 0.0089 0.944 0.988
total 0.754 0.7598 0.1166 0.1156 0.0136 0.952 1.000
pie 0.143 0.1462 0.0508 0.0505 0.0026 0.942 0.942
107
Table 22: Output for Monte Carlo simulation, analyzing by M and Y regressed
on X only
y ON
x 0.000 0.6545 0.0877 0.0866 0.4360 0.000 1.000
m ON
x 0.500 0.4995 0.1033 0.0998 0.0107 0.952 1.000
y WITH
m 0.500 0.4978 0.0512 0.0498 0.0026 0.942 1.000
Intercepts
y 0.000 2.0014 0.0637 0.0611 4.0098 0.000 1.000
m 2.000 2.0000 0.0751 0.0705 0.0056 0.942 1.000
Residual variances
y 0.750 0.7486 0.0515 0.0529 0.0027 0.952 1.000
m 1.000 0.9956 0.0714 0.0704 0.0051 0.952 1.000
New/additional parameters
rhocurl 0.577 0.5760 0.0345 0.0334 0.0012 0.938 1.000
beta1 0.500 0.5000 0.0366 0.0354 0.0013 0.928 1.000
beta2 0.400 0.4049 0.0730 0.0729 0.0053 0.938 1.000
beta0 1.000 1.0014 0.0897 0.0867 0.0080 0.940 1.000
sig1 0.500 0.4984 0.0338 0.0352 0.0011 0.950 1.000
ind 0.250 0.2495 0.0543 0.0531 0.0029 0.952 1.000
de 0.400 0.4049 0.0730 0.0729 0.0053 0.938 1.000
108
Table 23: Output for generating data with true residual correlation 0.25 and
analyzing data with Imai’s ρ fixed at the true value 0.25
y ON
x 0.000 0.6551 0.0975 0.0962 0.4386 0.000 1.000
m ON
x 0.500 0.5007 0.1033 0.0998 0.0107 0.956 1.000
y WITH
m 0.854 0.6743 0.0597 0.0586 0.0357 0.170 1.000
Intercepts
y 0.000 2.0016 0.0708 0.0679 4.0112 0.000 1.000
m 2.000 2.0003 0.0752 0.0705 0.0056 0.938 1.000
Residual variances
y 1.104 0.9251 0.0637 0.0654 0.0359 0.232 1.000
m 1.000 0.9957 0.0714 0.0704 0.0051 0.958 1.000
New/additional parameters
rho 0.250 0.2500 0.0000 0.0000 0.0000 0.000 1.000
rhocurl 0.812 0.7021 0.0262 0.0253 0.0129 0.002 1.000
beta1 0.500 0.5001 0.0366 0.0354 0.0013 0.928 1.000
beta2 0.400 0.4049 0.0732 0.0729 0.0054 0.938 1.000
beta0 1.000 1.0011 0.0892 0.0867 0.0079 0.944 1.000
sig1 0.707 0.3528 0.0121 0.0125 0.1257 0.000 1.000
ind 0.250 0.2502 0.0544 0.0532 0.0030 0.952 1.000
de 0.400 0.4049 0.0732 0.0729 0.0054 0.938 1.000
109
Table 24: Output for head circumference analysis using the Imai et al. sensitivity
approach with ρ = 0
Two-Tailed
Parameter Estimate S.E. Est./S.E. P-value
hcirc36 ON
alccig -0.079 0.115 -0.684 0.494
gender 0.697 0.082 8.467 0.000
eth 0.090 0.083 1.093 0.274
hcirc0 ON
alccig -0.366 0.108 -3.384 0.001
gender 0.345 0.079 4.363 0.000
eth 0.368 0.079 4.641 0.000
hcirc36 WITH
hcirc0 0.408 0.044 9.304 0.000
Intercepts
hcirc0 -0.301 0.071 -4.264 0.000
hcirc36 -0.400 0.073 -5.477 0.000
Residual variances
hcirc0 0.919 0.054 17.108 0.000
hcirc36 0.878 0.056 15.797 0.000
New/additional parameters
rho 0.000 0.000 0.000 1.000
rhocurl 0.454 0.036 12.566 0.000
beta1 0.444 0.040 11.074 0.000
beta2 0.084 0.106 0.790 0.429
beta0 -0.266 0.067 -3.983 0.000
sig1 0.000 0.000 0.000 1.000
indirect -0.162 0.050 -3.239 0.001
direct 0.084 0.106 0.790 0.429
110