<?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 Using proc genmod for log-binomial regression; failing to converge with continuous variable in model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Using-proc-genmod-for-log-binomial-regression-failing-to/m-p/850356#M42100</link>
    <description>&lt;P&gt;I am using this code to calculate RR (outcome: dpneum=1, primary predictor: pathogen)&amp;nbsp;for a retrospective cohort study using log-binomial regression:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data = clean.stacked;
	class	pathogen			(REF = 'RSV')
			cld					(REF = '99')
			race_eth			(REF = 'White')
			;
	model dpneum2 (event="1")= pathogen age_years cld race_eth/dist=bin link=log;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I recently introduced "age_years" (continuous variable) into the model and since doing so, the model is failing to converge with the log results as follows:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: PROC GENMOD is modeling the probability that dpneum2='1'. One way to change this to model the probability that dpneum2='99' 
      is to specify the DESCENDING option in the PROC statement.
WARNING: The specified model did not converge.
NOTE: The Pearson chi-square and deviance are not computed since the AGGREGATE option is not specified.
ERROR: The mean parameter is either invalid or at a limit of its range for some observations.
NOTE: The scale parameter was held fixed.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GENMOD used (Total process time):
      real time           6.78 seconds
      cpu time            0.18 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am not sure of next steps. I have been able to successfully run the model as both a Poisson regression and logistic regression (model converges), however each of these is giving vastly different parameter estimates (i.e. completing changing the direction of the effect between models).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have opted to use log-binomial regression to assess the association between pathogen and dpneum2 because the overall prevalence of dpneum2 in the sample is &amp;gt;10% (16.5%), however the prevalence per pathogen does dip below 10% for some (16.1%, 10.1%, 7.8%) so I am wondering if logistic regression is the better choice if this is criteria for suggesting the outcome is "rare."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally I would like to run a log-binomial regression here, so any suggestions for data restructuring or otherwise are appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Dec 2022 17:37:28 GMT</pubDate>
    <dc:creator>mlensing</dc:creator>
    <dc:date>2022-12-19T17:37:28Z</dc:date>
    <item>
      <title>Using proc genmod for log-binomial regression; failing to converge with continuous variable in model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-proc-genmod-for-log-binomial-regression-failing-to/m-p/850356#M42100</link>
      <description>&lt;P&gt;I am using this code to calculate RR (outcome: dpneum=1, primary predictor: pathogen)&amp;nbsp;for a retrospective cohort study using log-binomial regression:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data = clean.stacked;
	class	pathogen			(REF = 'RSV')
			cld					(REF = '99')
			race_eth			(REF = 'White')
			;
	model dpneum2 (event="1")= pathogen age_years cld race_eth/dist=bin link=log;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I recently introduced "age_years" (continuous variable) into the model and since doing so, the model is failing to converge with the log results as follows:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: PROC GENMOD is modeling the probability that dpneum2='1'. One way to change this to model the probability that dpneum2='99' 
      is to specify the DESCENDING option in the PROC statement.
WARNING: The specified model did not converge.
NOTE: The Pearson chi-square and deviance are not computed since the AGGREGATE option is not specified.
ERROR: The mean parameter is either invalid or at a limit of its range for some observations.
NOTE: The scale parameter was held fixed.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GENMOD used (Total process time):
      real time           6.78 seconds
      cpu time            0.18 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am not sure of next steps. I have been able to successfully run the model as both a Poisson regression and logistic regression (model converges), however each of these is giving vastly different parameter estimates (i.e. completing changing the direction of the effect between models).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have opted to use log-binomial regression to assess the association between pathogen and dpneum2 because the overall prevalence of dpneum2 in the sample is &amp;gt;10% (16.5%), however the prevalence per pathogen does dip below 10% for some (16.1%, 10.1%, 7.8%) so I am wondering if logistic regression is the better choice if this is criteria for suggesting the outcome is "rare."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally I would like to run a log-binomial regression here, so any suggestions for data restructuring or otherwise are appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 17:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-proc-genmod-for-log-binomial-regression-failing-to/m-p/850356#M42100</guid>
      <dc:creator>mlensing</dc:creator>
      <dc:date>2022-12-19T17:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using proc genmod for log-binomial regression; failing to converge with continuous variable in m</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-proc-genmod-for-log-binomial-regression-failing-to/m-p/850367#M42101</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;Please see&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="cs9F1D3EE3"&gt;&lt;A class="cs9F1D3EE3" href="http://support.sas.com/kb/23001" target="_blank"&gt;&lt;SPAN&gt;this usage note&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csFE01109C"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which addresses the error message &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="cs2D4E83B9" href="http://support.sas.com/kb/23003" target="_blank"&gt;&lt;SPAN class="cs9F1D3EE3"&gt;this note&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csFE01109C"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that discusses such problems with log-linked binomial models.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;The answers to many questions can be found in the Samples and SAS Notes in our searchable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="cs9F1D3EE3"&gt;&lt;A class="cs9F1D3EE3" href="http://support.sas.com/notes" target="_blank"&gt;&lt;SPAN&gt;knowledgebase&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csFE01109C"&gt;. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;You can use the search engine there to find the answers you need. &amp;nbsp;&lt;BR /&gt;See also our list of Frequently Asked for Statistics,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="cs9F1D3EE3"&gt;&lt;A class="cs9F1D3EE3" href="http://support.sas.com/kb/30333" target="_blank"&gt;&lt;SPAN&gt;FASTats&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csFE01109C"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;(answer stolen from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;20-OCT-2016)&lt;BR /&gt;&lt;BR /&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 19:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-proc-genmod-for-log-binomial-regression-failing-to/m-p/850367#M42101</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-12-19T19:15:04Z</dc:date>
    </item>
  </channel>
</rss>

