BookmarkSubscribeRSS Feed
Well21
Calcite | Level 5

Hi everyone! I’m working on the causal mediation analysis. Because of missing data in my study variables, I chose multiple imputation to generate 5 completed datasets. After finishing the causalmed analysis of all dataset. I found it difficult to pool the results together. The examples given in the sashelp use ‘ods output parameterestimates = result’ to generate the result for MIANALYZE. But when I put same syntax in sas, a warning occurred listed below.

 

WARNING: Output 'parameterestimates' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.

 

I’ve tried to replace ‘ParameterEstimates’ with ‘MediatorEstimates’. The result stayed same. Is there any code that could generate parameter estimates in proc causalmed that could be used in MIANALYZE?

Many thanks!

 

My code

proc mi data = pat nimpute = 5 out = newpat5 minimum = 0 seed = 309943001;

fcs regpmm(leptin) outiter = para5;

var hwbmi vsage1 cvd leptin;

run;

proc causalmed data = newpat5;

class status(ref = first) drink smoke bmi cvd;

model status = event leptin;

mediator leptin = event; covar drink smoke bmi cvd;

bootstrap CI (PERC) Nboot = 1000;

by _Imputation_;

ods output parameterestimates = result;

run;

9 REPLIES 9
sbxkoenk
SAS Super FREQ

Moved this post to 'Statistical Procedures' board

and asking @SAS_Rob for help.

 

Thanks,

Koen

Well21
Calcite | Level 5

So can @SAS_Rob kindly give me an answer?

If there's no proper syntax for causalmed, can I create a dataset similar to the ParameterEstimats mentioned above and import it as the data for proc MIANALYZE?

Thank you!

Well21
Calcite | Level 5

An update to the question. I've found the proper syntax, 'ods output EffectSummary = result;', which could output the ORs of CDE, NDE and NIE.

But I've encountered a new problem. How could I input proper syntax of 'modeleffects' syntax in MIANALYZE to pool the ORs of 5 datasets together?

Thanks!

 

My new code

proc causalmed data = newpat5;
class status(ref = first) drink smoke bmi cvd;
model status = event leptin;
mediator leptin = event;
covar drink smoke bmi cvd;
bootstrap CI (PERC) Nboot = 1000;
by _Imputation_;
ods output EffectSummary = result;
run;

 

proc mianalyze parms = result;
modeleffects leptin; (I know it is not the proper syntax here)
run;

sbxkoenk
SAS Super FREQ

Hello @Well21 ,

 

I have just checked the status of @SAS_Rob and he is unavailable for some time.

And myself, I have very limited experience with the SAS / STAT multiple imputation imputation procedures (MI & MIANALYZE).

 

If no answer by tomorrow evening (CEST time zone), I will ping someone from Technical Support to have a look !

( No time to dig into it myself this week 😞 and I cannot respond from the top of my head )

 

Koen

Well21
Calcite | Level 5
Thanks! I'll recheck the topic in evening.
StatsMan
SAS Super FREQ

Since you have CLASS effects in your CAUSALMED code, you probably need the CLASS statement in your PROC MIANALYZE step. You may also need the CLASSVAR option on the PARMS= option to further identify how your CLASS variables are represented in the input to MIANALYZE. 

Well21
Calcite | Level 5
Thanks for the reply!
My focus is simply on the continuous variable 'leptin' here. So I think there's no need for classvar option in the PROC MIANALYZE.
The problem I think is how to quote the TE, CDE, NDE and NIE generated from PROC CAUSALMED and put into the 'modeleffects' syntax.
Well21
Calcite | Level 5

Hi, everyone!

An update to the question.

Since my problem here is simply the forms of input data in the 'modeleffects' syntax in PROC MIANALYZE, I tried to create a dataset containing parameter estimates, standard error and 95% confidence intervals of the NDE, NIE and so on separately by _imputation_ numbers.

It works!

Below is the screenshot of my self-made input data, and the result of PROC MIANALYZE.

Still I'm not quite sure of the results. Can anyone judge whether my way is right or not? (@SAS_Rob for help!)

Thanks!

Well21_2-1655454450620.png

 

 

Well21_1-1655454420153.png

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 9 replies
  • 1058 views
  • 0 likes
  • 3 in conversation