Hi everybody!
Below is the code and result I used to make mediation analysis. I want to know if the OR in proc causalmed has the same meaning as in logistic or cox analysis. That is, if OR <1, the variable plays a protection role on the result.
The problem is that while the HR of interested variable (homa) I put in the proc phreg is >1, the OR of the same variable I've got in proc causalmed is <1. Both of them are significant. And I wonder whether something goes wrong or how can I explain the result?
Thanks!
My code of proc causalmed:
proc causalmed data = homa;
class status(ref = first) drink smoke bmi cvd;
model status = AVGapnea homa;
mediator homa = AVGapnea;
covar drink smoke bmi cvd;
bootstrap CI (PERC) Nboot = 1000;
run;
My code of proc phreg:
proc phreg data = homa;
class drink smoke bmi cvd;
model time*status(0) = AVGapnea drink smoke bmi cvd homa/ risklimits = WALD;
run;
The results:
If there were no mediator effect and you were running a survival model in CAUSALMED (which can be done in SAS Viya) then I would expect the results to be similar. But in this case you are trying to compare an odds ratio (that is adjusted for the mediator model) with a hazard ratio from a non-mediation model so no fair comparison could be made.
If there were no mediator effect and you were running a survival model in CAUSALMED (which can be done in SAS Viya) then I would expect the results to be similar. But in this case you are trying to compare an odds ratio (that is adjusted for the mediator model) with a hazard ratio from a non-mediation model so no fair comparison could be made.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.