Hello everyone,
I need your urgent help with a mediation analysis I am conducting using the PROC CAUSALMED method in SAS.
Background:
My study includes several mediators, several exposures, and several outcome variables. These variables create 165 possible "Exposure-Mediator-Outcome" pathways, and for each pathway, I am running simple mediation models (one predictor and one mediator per model).
Issue:
For all the pathways involving the mediator "v004_rawvalue_2019", the "Summary of Effects" table in output only provides the point estimates but does not report the standard errors, confidence intervals, or any other statistics, with a log saying the convergence is questionable. This issue does not occur for other "Exposure-Mediator-Outcome" models, so I’m unsure how to resolve them. I have tried commenting all the covariates out, but still received the same log and output. Please see the output in pic below:
Code and Log:
PROC CAUSALMED DATA = WORK.A DESC;
CLASS exposure MARITAL BREASTCANCER_SUBTYPE TUMOR_GRADE / REF=FIRST;
MEDIATOR v004_rawvalue_2019 = exposure;
MODEL outcome = exposure v004_rawvalue_2019 / DIST=BIN LINK=LOGIT;
COVAR AGE MARITAL BREASTCANCER_SUBTYPE TUMOR_GRADE;
RUN;
WARNING: The covariance matrix for the outcome model is not positive definite. The convergence is questionable.
WARNING: The covariance matrix for the mediator model is not positive definite. The convergence is questionable.
WARNING: Standard errors are not computed for the effect estimates.
Does anyone know how to deal with this 😿Thank you very much in advance!!
The WARNING message is essentially saying that the data does not support the model in question.
The classical suggestion would be to simplify the model, possibly by removing all the variables from the COVAR statement, and only adding variables back as you are able to get convergence. Very likely it is a single variable or two that is causing the problem.
But you claim you have done the latter (because you said you commented out all COVARs). Are you sure about this?
Anyway , I think you need to pick a model that is more conducive to the data.
Koen
This WARNING was discussed several times on the SAS Communities.
Do a Google search like this :
"WARNING: The covariance matrix for the outcome model is not positive definite. The convergence is questionable." site:communities.sas.com
(don't forget the quotes around the exact wording of the WARNING message)
Ciao, Koen
Hi Koen,
Thank you for your reply. I got the idea of eliminating the covariates from other SAS community posts. I am sure that commenting out all COVARs did not help and still produced the same result table as displayed in the original post (only point estimates shown and no SE, 95% CI, Z, and p-value). The mediator's variability and distribution also seem fine.
Covariates with cell sizes that are (very) small?
Koen
No I don't think so
BTW I tried imputing missing values using the mean for v004_rawvalue_2019, then redid the PROC CAUSALMED. The output shows a full complete Summary of Effects table, but the point estimates are very different from the incomplete table in the original post... (e.g. OR = 1.4 in the original incomplete table, while being 0.8 in this new table)
PS: 1077 values are missing in this mediator variable " v004_rawvalue_2019" with a total number of observations of 739,448.
Hi Koen, Thank you for your message.
In all the models where "v004_rawvalue_2019" is used as a mediator, I found a difference between Number of Observations Read and Number of Observations Used of 153,767. I have also checked this value in other mediators. Four other mediators have the same value of 135882, while others range from 152,969 to 153,637. These differences are not small and are even quite close to the difference for v004_rawvalue_2019. However, these models produce complete tables with data, while the model for v004_rawvalue_2019 does not. This seems very confusing.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.