<?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 How to Get Adjusted Risk Differences and 95% CIs Using PROC GENMOD Dist=Binomial Link=log? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Get-Adjusted-Risk-Differences-and-95-CIs-Using-PROC/m-p/988357#M49456</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know how to calculate adjusted risk differences and 95% confidence intervals using PROC GENMOD, dist=binomial, link=log?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to do this using link=identity instead of link=log (a la Spiegelman article); however, the actual risks produced using dist=binomial, link=log are quite different from the risks produced using dist=binomial and link=identity when doing adjusted analyses (risks identical for both methods in unadjusted analyses). I don't trust the link=identity risks as much as the link=log risks, and therefore also don't trust the associated adjusted risk differences/95% CIs from link=identity analyses. And those adjusted risk differences/95% CIs are what I'm ultimately needing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;***Link=log;&lt;/P&gt;&lt;P&gt;title3 "Proc GENMOD: Poisson Model Robust Variance Estimator - Died in 4 Weeks=Infection Type + Age 5 level + Immunosuppressive";&lt;BR /&gt;title4 "Adjusted Risks, Relative Risks";&lt;BR /&gt;title5;&lt;BR /&gt;proc genmod data=nb;&lt;BR /&gt;class hypoxic_14day agenumeric (ref="45-&amp;lt;60") immunosuppressive (ref="FALSE") testres (ref="zCovid Only") PatientICN;&lt;BR /&gt;*effect agespl=spline(agenumeric/details naturalcubic basis=tpf(noint)knotmethod=percentiles(4));&lt;BR /&gt;model hypoxic_14day (event="1")=testres agenumeric immunosuppressive/ dist=poisson link=log;&lt;BR /&gt;repeated subject=patienticn /type=ind;&lt;BR /&gt;lsmeans testres/diff exp cl;&lt;BR /&gt;estimate "RR (Flu v Covid)" testres 1 0 0 -1;&lt;BR /&gt;estimate "RR (RSV v Covid)" testres 0 1 0 -1;&lt;BR /&gt;estimate "RR (Multiple Inf v Covid)" testres 0 0 1 -1;&lt;BR /&gt;format agenumeric age4cat_. testres ztestres_.;&lt;BR /&gt;where agenumeric ge 17;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More trusted risks (red-circled):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmg_va_1-1779230463691.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115155iAEB961D65CA04B58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmg_va_1-1779230463691.png" alt="jmg_va_1-1779230463691.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;****Link=identity;&lt;/P&gt;&lt;P&gt;title4 "Adjusted Risk Differences";&lt;BR /&gt;title5;&lt;BR /&gt;proc genmod data=nb;&lt;BR /&gt;class hypoxic_14day agenumeric (ref="45-&amp;lt;60") immunosuppressive (ref="FALSE") testres (ref="zCovid Only") PatientICN;&lt;BR /&gt;*effect agespl=spline(agenumeric/details naturalcubic basis=tpf(noint)knotmethod=percentiles(4));&lt;BR /&gt;model hypoxic_14day (event="1")=testres agenumeric immunosuppressive/ dist=poisson link=identity;&lt;BR /&gt;repeated subject=patienticn /type=ind;&lt;BR /&gt;lsmeans testres/diff cl;&lt;BR /&gt;format agenumeric age4cat_. testres ztestres_.;&lt;BR /&gt;where agenumeric ge 17;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Less trusted risks (red-circled) and adjusted risk differences further below);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmg_va_2-1779230638632.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115156i642E819130BB836B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmg_va_2-1779230638632.png" alt="jmg_va_2-1779230638632.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can give! I've been grappling with this issue for a while!&lt;/P&gt;&lt;P&gt;Janet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2026 22:48:58 GMT</pubDate>
    <dc:creator>jmg_va</dc:creator>
    <dc:date>2026-05-19T22:48:58Z</dc:date>
    <item>
      <title>How to Get Adjusted Risk Differences and 95% CIs Using PROC GENMOD Dist=Binomial Link=log?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Get-Adjusted-Risk-Differences-and-95-CIs-Using-PROC/m-p/988357#M49456</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know how to calculate adjusted risk differences and 95% confidence intervals using PROC GENMOD, dist=binomial, link=log?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to do this using link=identity instead of link=log (a la Spiegelman article); however, the actual risks produced using dist=binomial, link=log are quite different from the risks produced using dist=binomial and link=identity when doing adjusted analyses (risks identical for both methods in unadjusted analyses). I don't trust the link=identity risks as much as the link=log risks, and therefore also don't trust the associated adjusted risk differences/95% CIs from link=identity analyses. And those adjusted risk differences/95% CIs are what I'm ultimately needing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;***Link=log;&lt;/P&gt;&lt;P&gt;title3 "Proc GENMOD: Poisson Model Robust Variance Estimator - Died in 4 Weeks=Infection Type + Age 5 level + Immunosuppressive";&lt;BR /&gt;title4 "Adjusted Risks, Relative Risks";&lt;BR /&gt;title5;&lt;BR /&gt;proc genmod data=nb;&lt;BR /&gt;class hypoxic_14day agenumeric (ref="45-&amp;lt;60") immunosuppressive (ref="FALSE") testres (ref="zCovid Only") PatientICN;&lt;BR /&gt;*effect agespl=spline(agenumeric/details naturalcubic basis=tpf(noint)knotmethod=percentiles(4));&lt;BR /&gt;model hypoxic_14day (event="1")=testres agenumeric immunosuppressive/ dist=poisson link=log;&lt;BR /&gt;repeated subject=patienticn /type=ind;&lt;BR /&gt;lsmeans testres/diff exp cl;&lt;BR /&gt;estimate "RR (Flu v Covid)" testres 1 0 0 -1;&lt;BR /&gt;estimate "RR (RSV v Covid)" testres 0 1 0 -1;&lt;BR /&gt;estimate "RR (Multiple Inf v Covid)" testres 0 0 1 -1;&lt;BR /&gt;format agenumeric age4cat_. testres ztestres_.;&lt;BR /&gt;where agenumeric ge 17;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More trusted risks (red-circled):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmg_va_1-1779230463691.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115155iAEB961D65CA04B58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmg_va_1-1779230463691.png" alt="jmg_va_1-1779230463691.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;****Link=identity;&lt;/P&gt;&lt;P&gt;title4 "Adjusted Risk Differences";&lt;BR /&gt;title5;&lt;BR /&gt;proc genmod data=nb;&lt;BR /&gt;class hypoxic_14day agenumeric (ref="45-&amp;lt;60") immunosuppressive (ref="FALSE") testres (ref="zCovid Only") PatientICN;&lt;BR /&gt;*effect agespl=spline(agenumeric/details naturalcubic basis=tpf(noint)knotmethod=percentiles(4));&lt;BR /&gt;model hypoxic_14day (event="1")=testres agenumeric immunosuppressive/ dist=poisson link=identity;&lt;BR /&gt;repeated subject=patienticn /type=ind;&lt;BR /&gt;lsmeans testres/diff cl;&lt;BR /&gt;format agenumeric age4cat_. testres ztestres_.;&lt;BR /&gt;where agenumeric ge 17;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Less trusted risks (red-circled) and adjusted risk differences further below);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmg_va_2-1779230638632.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115156i642E819130BB836B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmg_va_2-1779230638632.png" alt="jmg_va_2-1779230638632.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can give! I've been grappling with this issue for a while!&lt;/P&gt;&lt;P&gt;Janet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2026 22:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Get-Adjusted-Risk-Differences-and-95-CIs-Using-PROC/m-p/988357#M49456</guid>
      <dc:creator>jmg_va</dc:creator>
      <dc:date>2026-05-19T22:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get Adjusted Risk Differences and 95% CIs Using PROC GENMOD Dist=Binomial Link=log?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Get-Adjusted-Risk-Differences-and-95-CIs-Using-PROC/m-p/988358#M49457</link>
      <description>&lt;P&gt;See &lt;A href="https://support.sas.com/kb/37/228.html" target="_self"&gt;this note&lt;/A&gt; which uses several ways using the NLMeans and Margins macro and even PROC NLMIXED. The NLMeans example uses PROC LOGISTIC, but the same can be done if you use GENMOD. With either one, you can start with a logistic model, which is appropriate for a binary response.&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2026 22:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Get-Adjusted-Risk-Differences-and-95-CIs-Using-PROC/m-p/988358#M49457</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2026-05-19T22:56:30Z</dc:date>
    </item>
  </channel>
</rss>

