BookmarkSubscribeRSS Feed
RAStats
Calcite | Level 5

I am trying to use PROC CAUSALMED through SAS OnDemand for Academics (SAS Studio). I'd like to obtain the bootstrap CI for the mediation effect in a very simple mediation model (one predictor, one mediator). I am using the program shown below, and am getting the warning messages below the program (and no standard errors or test output). The variables are all continuous, and are somewhat correlated but are not linearly dependent. I can get all output using PROC REG so I know the models can be estimated. Any ideas on how I can get output for testing the mediation effect? 

Thanks in advance.


PROC CAUSALMED data=ch3ex;

model salary = Time Cits;

mediator Cits = Time;

bootstrap;

run;

 


WARNING: The covariance matrix for the outcome model is not positive definite. The convergence is questionable.

WARNING: Standard errors are not computed for the effect estimates.

WARNING: Bootstrapping is not done because the convergence of the fitting for either the outcome or the mediator model is

questionable.

8 REPLIES 8
sbxkoenk
SAS Super FREQ

Hello,

 

My colleague @SAS_Rob is probably a good "resource" to help you out here.

 

I would say the data is not supporting the model but that may be a little short (the model is indeed very simple and you can fit something close to it with PROC REG).

 

This usage note may be an additional inspiration :
Usage Note 59081: Mediation analysis

http://support.sas.com/kb/59/081.html

 

Good luck,

Koen

SAS_Rob
SAS Employee

Can you run the following and post the output and LOG?

PROC reg data=ch3ex;

model salary = Time Cits/collin;

run;

 

RAStats
Calcite | Level 5

Sure; I even added vif... 😉 

Collinearity is not an issue.

RAStats_0-1637100481709.png

 

 

SAS_Rob
SAS Employee

Could you also post the full output from:

 

proc means data=ch3ex min max mean std;

var salary Time Cits;

run;

 

I suspect that, given the magnitude of the estimates, the data itself might be ill-conditioned, but this would confirm that.

 

 

RAStats
Calcite | Level 5

Sure, here is the output:

RAStats_0-1637167912232.png

It's really a very simple data set and I find it strange that it is causing problems for this PROC.

RAStats
Calcite | Level 5

Update: based on your response, I used salary/1000 instead of salary and that produced output. The coefficients would be on a different scale, though, and I'm not sure how I'd explain the need for this. If you have an explanation as to why/when re-scaling is necessary, I'd be interested in understanding it better (and I hope that in the future the PROC can be made more flexible).  Thanks!

SAS_Rob
SAS Employee

Very often you will see things such as salary reported on a different scale for this reason--ill conditioned data due to large units.  All you end up doing is changing the units by rescaling so you would just report the results in the new units.

 

RAStats
Calcite | Level 5

I can certainly re-scale, it is just unclear why it would be considered ill-conditioned with this PROC when it can be analyzed (and the models converge) without issue using all other regression procedures.

I would also gently recommend a more accurate/informative "Warning" message for this situation (in case anyone who has control over that reads this).

In any case, thanks for identifying the problem.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 8 replies
  • 1113 views
  • 1 like
  • 3 in conversation