BookmarkSubscribeRSS Feed
tamhane
Obsidian | Level 7

Hi,

 

I was comparing the results of the PROC CAUSALMED procedure and the SAS macro given in the paper "Mediation Analysis Allowing for Exposure–Mediator Interactions and Causal Interpretation: Theoretical Assumptions and Implementation With SAS and SPSS Macros" by Valeri and VanderWeele.

 

Outcome=Binary

Exposure/Treatment=Binary

Mediator=Binary

 

All coded as 0 and 1.

 

However, the results obtained somewhat differ.

 

A] Program and Output of the macro

 

%mediation(data=anak23,yvar=BPControlBoth,avar=VL_LT200,mvar=MMAS_NonAdh,cvar=,a0=0,a1=1,m=0,yreg=logistic,mreg=logistic, interaction=false,casecontrol=,output=,c=,boot=,cens=);
run;

 

SAS Output

Obs Effect Estimate p_value _95__CI_lower _95__CI_upper1234
cde2.254500.0441961.021324.97666
nde2.254500.0441961.021324.97666
nie1.224820.0470731.002621.49627
total effect2.761370.0132511.236136.16857

 

 
 
SAS Output
Obs Effect Estimate1
proportion mediated0.28777
 
B] Program and Output of the CAUSALMED
 
proc causalmed data=anak23;
     model BPControlBoth = VL_LT200 MMAS_NonAdh;
     mediator MMAS_NonAdh = VL_LT200;
run;
 
SAS Output
The CAUSALMED Procedure
Summary of Effects  Estimate StandardError Wald 95%Confidence Limits Z Pr > |Z|Total EffectControlled Direct Effect (CDE)Natural Direct Effect (NDE)Natural Indirect Effect (NIE)Percentage MediatedPercentage Due to InteractionPercentage Eliminated
0.22990.09130.050890.40892.520.0118
0.19320.09080.015300.37112.130.0333
0.19320.09080.015300.37112.130.0333
0.03670.0191-0.000780.074171.920.0550
15.96139.7584-3.164835.08751.640.1019
0.....
15.96139.7584-3.164835.08751.640.1019
 
Thanks.
 
Ashutosh
2 REPLIES 2
tamhane
Obsidian | Level 7

Just to highlight the results of the NIE and % mediated.  

 

                        macro   Causalmed

p-value           0.047           0.055

% mediated     28.78         15.96

 

Thanks.

MichaelL_SAS
SAS Employee

I believe the issue is that the PROC CAUSALMED code does not specify that the outcome, mediator, and treatment are binary, so as a result the CAUSALMED procedure is modeling the outcome and mediator with a normal distribution not logistic regression. You can check if this is the case by looking at the "Model Information" table produced with the example code. 

 

Specifying the mediator and treatment variables in the CLASS statement will indicate that they are binary and you can use the DIST=bin option in the MODEL statement to indicate the outcome is binary and should be modeled using logistic regression. The third example in the documentation for PROC CAUSALMED has an example of causal mediation analysis with treatment, outcome, and mediator, all binary.

 

https://go.documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_causalmed_e...

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 3010 views
  • 2 likes
  • 2 in conversation