Hi!
I am trying to do a mediation analysis in which brain volumes are the mediator (continuous), meditteranean diet the exposure (continuous), and cognitive test scores (continuous) the outcome. However, whenver I run the analysis I get the following message in the log and my code:
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.
proc causalmed data=cog;
model icogstroop = Meddietavg per_TBV25 ;
mediator per_TBV25 =Meddietavg ;
covar age0 sex race center education avgpact smoke avgbmi caloriesavg htn anycvd diab2hhba1ccum25;
run;
Thank you in advance for your help!
Yes, the error message did go away, so I decided to just do the mediation analysis without the covariates!
The general meaning of the message is that the data does not support either of the causal models. The likely culprit is one or more of the covariates causing a singularity in the model. Unfortunately it is sometimes difficult to know which one(s) so in practice the easiest thing to do is a process of elimination by starting with just a single covariate and then adding from there until the problem occurs.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.