<?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 to calculate relative risks after PROC MIANALYZE step in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/712532#M34441</link>
    <description>&lt;P&gt;If you use the link I provided to the macro's documentation, you will see that the &lt;STRONG&gt;b_p&lt;EM&gt;x&lt;/EM&gt;&lt;/STRONG&gt; values are the names the macro uses to refer to the model parameter estimates. So, the numerator expression, logistic(b_p1), computes the probability that big=1 by applying the inverse logit to the b_p1 parameter which is the intercept. Similarly for the denominator expression. The function, logistic(x), applies the inverse of the logit, 1/(1+exp(-x)).&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 22:25:49 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2021-01-19T22:25:49Z</dc:date>
    <item>
      <title>How to calculate relative risks after PROC MIANALYZE step</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/710940#M34394</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if anybody can help me calculating the relative risks of datasets produced by PROC MI and later combined by PROC MIANALYZE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that PROC MIANALYZE does not have an option for producing this and the following link is a great example of how to calculate odds ratios in the data step after PROC MIANALYZE but I could not figure out the relative risks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/calculation-of-odds-ratio-in-proc-mianalyse/td-p/507552" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/calculation-of-odds-ratio-in-proc-mianalyse/td-p/507552&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recep&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 23:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/710940#M34394</guid>
      <dc:creator>Recep</dc:creator>
      <dc:date>2021-01-12T23:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative risks after PROC MIANALYZE step</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/711049#M34397</link>
      <description>&lt;P&gt;You don't provide details, but if you want the relative risks as calculated by PROC LOGISTIC, you can take the averaged parameter estimates from PROC MIANALYZE and pass them to PROC LOGISTIC. For details and an example, see &lt;A href="https://blogs.sas.com/content/iml/2020/12/02/score-external-logistic-model.html" target="_self"&gt;"How to score a logistic regression model that was not fit by PROC LOGISTIC."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 12:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/711049#M34397</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-01-13T12:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative risks after PROC MIANALYZE step</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/711253#M34408</link>
      <description>&lt;P&gt;This can be done using the NLEstimate macro as described, for non-imputed data, in &lt;A href="http://support.sas.com/kb/23003" target="_self"&gt;this note&lt;/A&gt;. Using the FISH2 data used in the logistic regression example in the MIANALYZE documentation, and adding to it a binary variable, BIG, as big=(length&amp;gt;20);, the following fits the logistic model and then uses the &lt;A href="http://support.sas.com/kb/58775" target="_self"&gt;NLEstimate macro&lt;/A&gt; to estimate the relative risk, Pr(big=1)/Pr(big=0). Note that the combined parameter estimates and covariance matrix are needed from MIANALYZE. Since the macro always tests that the estimated quantity equals zero, to test that the relative risk equals 1, 1 is subtracted from the definition of the relative risk in the the f= parameter of the macro.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=Fish2 seed=1305417 out=outfish2;
   class Species big;
   monotone logistic(Species=big);
   var big Species;
run;
ods select none;
proc logistic data=outfish2 outest=out1 covout;
   class  big / param=glm;
   model Species= big / covb;
   by _Imputation_;
run;
ods select all;
proc mianalyze data=out1 tcov;
   modeleffects Intercept big0;
   ods output parameterestimates=pe tcov=cov;
run;
%nlest(inest=pe, incovb=cov, f=logistic(b_p1)/logistic(b_p1+b_p2)-1 )
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jan 2021 19:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/711253#M34408</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-01-13T19:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative risks after PROC MIANALYZE step</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/712527#M34440</link>
      <description>&lt;P&gt;Thanks a lot for your response &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;! I'm having a bit of hard time understanding the relative risk calculation within the %nlest macro.&lt;BR /&gt;What is b_p1 and b_p2? When I replicate the code you provided above, neither "out1" nor "pe" dataset does not include those variables.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 21:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/712527#M34440</guid>
      <dc:creator>Recep</dc:creator>
      <dc:date>2021-01-19T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate relative risks after PROC MIANALYZE step</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/712532#M34441</link>
      <description>&lt;P&gt;If you use the link I provided to the macro's documentation, you will see that the &lt;STRONG&gt;b_p&lt;EM&gt;x&lt;/EM&gt;&lt;/STRONG&gt; values are the names the macro uses to refer to the model parameter estimates. So, the numerator expression, logistic(b_p1), computes the probability that big=1 by applying the inverse logit to the b_p1 parameter which is the intercept. Similarly for the denominator expression. The function, logistic(x), applies the inverse of the logit, 1/(1+exp(-x)).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 22:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-relative-risks-after-PROC-MIANALYZE-step/m-p/712532#M34441</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-01-19T22:25:49Z</dc:date>
    </item>
  </channel>
</rss>

