<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I combine mianalyze and causalmed for a binary outcome in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/821936#M40666</link>
    <description>&lt;P&gt;Are you trying to get Odds Ratios for the Outcome Model or what?&amp;nbsp; What estimates do you want specifically?&amp;nbsp; Right now it looks like you are taking the estimates from the Summary of Effects table and exponentiating them.&amp;nbsp; I do not think that is what you want since the OR (Total Effect), OR (CDE, NDE, NIE) are already in that table.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 21:06:00 GMT</pubDate>
    <dc:creator>SAS_Rob</dc:creator>
    <dc:date>2022-07-06T21:06:00Z</dc:date>
    <item>
      <title>How do I combine mianalyze and causalmed for a binary outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/821884#M40662</link>
      <description>&lt;P&gt;I am attempting to conduct a mediation analysis of multiple imputation dataset where the outcome variable is binary. I was able to find only limited information online for how to combine causalmed and mianalyze. The only available example (&lt;A href="https://support.sas.com/kb/68/444.html" target="_self"&gt;Usage Note 68444: Examples of combining PROC CAUSALMED results in PROC MIANALYZE&lt;/A&gt;) is for a continuous outcome. I have attempted to replicate this code, adding a class statement and converting the estimate produced to an odd ratio.&amp;nbsp;&lt;SPAN&gt;I want to ensure the code I produced is correct and that there is not a better way to combine these procedures.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A few details about the data:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the sample prior to mi n=2146&lt;/LI&gt;&lt;LI&gt;proc mi with 25 imputations performed&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;depres is the outcome variable, binary yes/no depression symptoms of clinical concern&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;ACE_four is the predictor variable, binary yes/no experience of 4 or more adverse childhood experiences&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;dadmeancat is the mediator, binary low/high support from baby's father&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;matage, fplevel, education, racesap and fammeancat are covariates&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=""&gt;TITLE " MULTIPLE IMPUTATION MEDIATION ANALYSIS - depres and dadsmeancat";
proc causalmed data=mi_FCS_ACEcat all;
by _imputation_;
class Depres(descending) ACE_four(descending) fplevel(descending) education(descending) racesap famsmeancat(descending) dadsmeancat(descending);
model Depres=ACE_four dadsmeancat ACE_four*dadsmeancat;
mediator dadsmeancat=ACE_four;
covar mat_age fplevel education racesap famsmeancat;
ods output OutcomeEstimates=Outcome_Est MediatorEstimates=Med_Est PercentDecomp=pctdecomp EffectDecomp=effdecomp EffectSummary=effsum;
run;

proc mianalyze parms(classvar=level)=outcome_Est edf=2126;
Class fplevel education racesap famsmeancat ace_four dadsmeancat;
modeleffects intercept mat_age fplevel education racesap famsmeancat ace_four dadsmeancat ace_four*dadsmeancat;
title 'combined estimates for the outcome model';
run;

proc mianalyze parms(classvar=level)=Med_Est edf=2126;
Class fplevel education racesap famsmeancat ace_four;
modeleffects intercept mat_age fplevel education racesap famsmeancat ace_four;
title 'Combined estimates for the meditor model';
run;

data effsum; set effsum;
OR=exp(estimate);
run;

proc sort data=effsum;
by effect _imputation_;
run;

proc mianalyze data=effsum edf=2126;
by effect;
modeleffects OR;
stderr stderr;
title 'Summary of Causal Effects';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 16:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/821884#M40662</guid>
      <dc:creator>edoher0061</dc:creator>
      <dc:date>2022-07-06T16:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine mianalyze and causalmed for a binary outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/821936#M40666</link>
      <description>&lt;P&gt;Are you trying to get Odds Ratios for the Outcome Model or what?&amp;nbsp; What estimates do you want specifically?&amp;nbsp; Right now it looks like you are taking the estimates from the Summary of Effects table and exponentiating them.&amp;nbsp; I do not think that is what you want since the OR (Total Effect), OR (CDE, NDE, NIE) are already in that table.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 21:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/821936#M40666</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-07-06T21:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine mianalyze and causalmed for a binary outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/822097#M40681</link>
      <description>&lt;P&gt;Thank you for your response&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/155173"&gt;@SAS_Rob&lt;/a&gt;&amp;nbsp; My intention is to get the total, direct and indirect effects as odds ratios. When running my code without the (&lt;STRONG&gt;data&lt;/STRONG&gt; effsum; set effsum; OR=exp(estimate);&amp;nbsp;&lt;STRONG&gt;run;&amp;nbsp; )&lt;/STRONG&gt;&amp;nbsp;piece, I received output in which the p-values did not match the&amp;nbsp; 95% CIs (example of one of the summary of effects outputs below). I may be incorrect but I&amp;nbsp;looked like this inconsistency could be the result of presenting beta estimates rather than ORs and so exponentiating was my attempted solution. The only other thing I thought might be causing this inconsistency was having incorrectly specified the complete degrees of freedom in the edf statement but upon testing different numbers that did not appear to affect the issue.&amp;nbsp;Do you see a reason why the p-values wouldn't match the&amp;nbsp;CIs? Or is this something I should not be concerned about and just present the 95% CIs?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="summary of effects indirect.PNG" style="width: 852px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73029i3258A7DE9706078D/image-size/large?v=v2&amp;amp;px=999" role="button" title="summary of effects indirect.PNG" alt="summary of effects indirect.PNG" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 16:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/822097#M40681</guid>
      <dc:creator>edoher0061</dc:creator>
      <dc:date>2022-07-07T16:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine mianalyze and causalmed for a binary outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/822101#M40682</link>
      <description>&lt;P&gt;I suspect it has to do with the test that the odds ratio=0.&amp;nbsp; You should test whether it is one.&amp;nbsp; Add the THETA0=1 option on the MIANALYZE statement and see if that helps.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_mianalyze_syntax01.htm#statug.mianalyze.theta0opt" target="_blank"&gt;SAS Help Center: PROC MIANALYZE Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 16:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-combine-mianalyze-and-causalmed-for-a-binary-outcome/m-p/822101#M40682</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-07-07T16:55:58Z</dc:date>
    </item>
  </channel>
</rss>

