(View the complete code for this example.)
This example illustrates the use of linear structural equation modeling and the CALIS procedure for doing a limited form of mediation analysis. For this analysis, the CALIS procedure and the CAUSALMED procedure produce results that are very similar. However, the more general approach implemented in the CAUSALMED procedure is needed to define and compute the mediation effects in a broader context. Within this context, Example 38.1 illustrates how the general approach deals with interaction effects, and Example 38.3 illustrates how it treats binary outcomes and binary mediators in a unified fashion.
The scenario in this example is the observational study that is presented in the section Getting Started: CAUSALMED Procedure. The goals of the study are to determine whether an encouraging environment provided by parents (which is represented by the variable Encourage) has an effect on the cognitive development of children (which is represented by the variable CogPerform) and to estimate the amount of the total causal effect that is due to the mediation of learning motivation (which is represented by the variable Motivation).
In the example in the section Getting Started: CAUSALMED Procedure, PROC CAUSALMED is used to carry out two mediation analyses:
proc causalmed data=Cognitive;
model CogPerform = Encourage Motivation;
mediator Motivation = Encourage;
run;
proc causalmed data=Cognitive;
model CogPerform = Encourage Motivation;
mediator Motivation = Encourage;
covar FamSize SocStatus;
run;
The first analysis does not specify any confounding covariates. It produces the summary of effects in Output 38.4.1, which shows that the 'Percentage Mediated' is about 47%.
Output 38.4.1: Estimation of Causal Effects without Adjusting for Confounding Covariates
| Summary of Effects | ||||||
|---|---|---|---|---|---|---|
| Estimate | Standard Error |
Wald 95% Confidence Limits |
Z | Pr > |Z| | ||
| Total Effect | 8.0423 | 0.03200 | 7.9796 | 8.1050 | 251.30 | <.0001 |
| Controlled Direct Effect (CDE) | 4.2835 | 0.1062 | 4.0754 | 4.4917 | 40.33 | <.0001 |
| Natural Direct Effect (NDE) | 4.2835 | 0.1062 | 4.0754 | 4.4917 | 40.33 | <.0001 |
| Natural Indirect Effect (NIE) | 3.7588 | 0.1091 | 3.5449 | 3.9727 | 34.44 | <.0001 |
| Percentage Mediated | 46.7377 | 1.3254 | 44.1400 | 49.3353 | 35.26 | <.0001 |
| Percentage Due to Interaction | 0 | . | . | . | . | . |
| Percentage Eliminated | 46.7377 | 1.3254 | 44.1400 | 49.3353 | 35.26 | <.0001 |
The second analysis specifies confounding covariates. It produces the summary of effects in Output 38.4.2. These effects have more appropriate causal interpretations if FamSize and SocStatus are the only important confounding variables that must be controlled for. Controlling for covariates, Output 38.4.2 shows a more conservative 'Percentage Mediated' of 37%.
Output 38.4.2: Estimation of Causal Effects Adjusting for Confounding Covariates
| Summary of Effects | ||||||
|---|---|---|---|---|---|---|
| Estimate | Standard Error |
Wald 95% Confidence Limits |
Z | Pr > |Z| | ||
| Total Effect | 6.8435 | 0.1525 | 6.5446 | 7.1424 | 44.88 | <.0001 |
| Controlled Direct Effect (CDE) | 4.2962 | 0.1098 | 4.0811 | 4.5114 | 39.14 | <.0001 |
| Natural Direct Effect (NDE) | 4.2962 | 0.1098 | 4.0811 | 4.5114 | 39.14 | <.0001 |
| Natural Indirect Effect (NIE) | 2.5473 | 0.1563 | 2.2410 | 2.8536 | 16.30 | <.0001 |
| Percentage Mediated | 37.2219 | 1.7523 | 33.7874 | 40.6564 | 21.24 | <.0001 |
| Percentage Due to Interaction | 0 | . | . | . | . | . |
| Percentage Eliminated | 37.2219 | 1.7523 | 33.7874 | 40.6564 | 21.24 | <.0001 |
he second analysis decomposes the total effect of an encouraging environment on cognitive development into two percentages:
Statements such as these invite the use of structural equation modeling, which offers the same type of language for describing causal sequences. Indeed, mediation analysis has a relatively long history in the field of psychology, where structural equation modeling is quite popular.
By specifying the relevant causal pathways in structural equation models, you can use the CALIS procedure to obtain essentially the same mediation analyses as those obtained with the CAUSALMED procedure:
proc calis data=cognitive;
path
Encourage ===> Motivation,
Encourage Motivation ===> CogPerform;
effpart Encourage ===> CogPerform;
run;
proc calis data=cognitive;
path
Encourage ===> Motivation,
Encourage Motivation ===> CogPerform,
FamSize ===> Encourage Motivation CogPerform,
SocStatus ===> Encourage Motivation CogPerform;
effpart Encourage ===> CogPerform;
run;
The EFFPART statements request the total effect decompositions of Encourage on CogPerform in the two analyses. Output 38.4.3 shows the total effect decomposition when the covariates are ignored in the linear structural equation model. The total, direct, and indirect effects and their standard error estimates closely match those in Output 38.4.1.
Output 38.4.3: Summary of Causal Effects
| Effects of Encourage | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Effect / Std Error / t Value / p Value | |||||||||||||||
| Total | Direct | Indirect | |||||||||||||
| CogPerform |
|
|
|
||||||||||||
Output 38.4.4 shows the total effect decomposition when the covariates are incorporated in the linear structural equation model. Again, the total, direct, and indirect effects and their standard error estimates closely match those in Output 38.4.2.
Output 38.4.4: Summary of Causal Effects
| Effects of Encourage | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Effect / Std Error / t Value / p Value | |||||||||||||||
| Total | Direct | Indirect | |||||||||||||
| CogPerform |
|
|
|
||||||||||||
However, the similarity of the analyses obtained with the CALIS and CAUSALMED procedures does not extend to more general situations. The limitations of structural equation modeling include the following:
It does not have a clear foundation for defining causal mediation effects.
It does not deal with interaction effects effectively.
It does not treat binary outcomes and binary mediators in a unified fashion.
The general mediation approach that is implemented in PROC CAUSALMED overcomes these limitations of traditional linear structural equation modeling. For more information about the theoretical foundation of the general mediation approach, see the sections Causal Mediation Effects: Theory, Definitions, and Effect Decompositions and Causal Mediation Effects: Assumptions, Identification, and Estimation.