<?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 Non-convergence after specifying AGGREGATE option in PROC GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428869#M22525</link>
    <description>&lt;P&gt;Hi everybody!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've fitted a log-binomial model with PROC GENMOD and want to output the deviance fit statistics. After specifying the AGGREGATE option, though, the model does not converge anymore. I know fitting log binomial models is still an issue and often leads to non-convergence, which was a problem as well. Therefore, I applied the revised COPY method by Deddens et al.* which worked and the model converged.&lt;/P&gt;&lt;P&gt;Anyway, could the weighting cause the problem? Does anybody has an idea what the reason could be? Alternatively, I think about calculating the LR test by hand with the log likelihood information from my fitted model and an intercept-only model - would that be appropriate? I guess simply running a logistic model would be inappropriate becaus in fact with a different link function it is a different model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In principle, that's my syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=data desc;
weight w;
class a b c d             /param=ref;
model y=a b c d e f  /dist=binomial link=log intercept=-4 cl (((aggregate)));
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I appreciate your comments and answers. As this is my first question, please let me know if you need further information!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*COPY method: save a copy of the original data set weighted with .999 and a second copy with the response reversed and weight .001. then merge the two copies into one data set and use this third data set for regression (with weight statement). (&lt;A href="http://oem.bmj.com/content/65/7/501.long" target="_blank"&gt;http://oem.bmj.com/content/65/7/501.long&lt;/A&gt;)&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2018 16:45:52 GMT</pubDate>
    <dc:creator>CK1988</dc:creator>
    <dc:date>2018-01-18T16:45:52Z</dc:date>
    <item>
      <title>Non-convergence after specifying AGGREGATE option in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428869#M22525</link>
      <description>&lt;P&gt;Hi everybody!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've fitted a log-binomial model with PROC GENMOD and want to output the deviance fit statistics. After specifying the AGGREGATE option, though, the model does not converge anymore. I know fitting log binomial models is still an issue and often leads to non-convergence, which was a problem as well. Therefore, I applied the revised COPY method by Deddens et al.* which worked and the model converged.&lt;/P&gt;&lt;P&gt;Anyway, could the weighting cause the problem? Does anybody has an idea what the reason could be? Alternatively, I think about calculating the LR test by hand with the log likelihood information from my fitted model and an intercept-only model - would that be appropriate? I guess simply running a logistic model would be inappropriate becaus in fact with a different link function it is a different model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In principle, that's my syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=data desc;
weight w;
class a b c d             /param=ref;
model y=a b c d e f  /dist=binomial link=log intercept=-4 cl (((aggregate)));
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I appreciate your comments and answers. As this is my first question, please let me know if you need further information!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*COPY method: save a copy of the original data set weighted with .999 and a second copy with the response reversed and weight .001. then merge the two copies into one data set and use this third data set for regression (with weight statement). (&lt;A href="http://oem.bmj.com/content/65/7/501.long" target="_blank"&gt;http://oem.bmj.com/content/65/7/501.long&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428869#M22525</guid>
      <dc:creator>CK1988</dc:creator>
      <dc:date>2018-01-18T16:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Non-convergence after specifying AGGREGATE option in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428938#M22528</link>
      <description>&lt;P&gt;I am not an expert on this topic, but I would have expected to see&lt;/P&gt;
&lt;P&gt;AGGREGATE=(a b c d)&lt;/P&gt;
&lt;P&gt;The doc says "Specifying the AGGREGATE option is equivalent to specifying the AGGREGATE= option with a variable list that includes all explanatory variables in the MODEL statement."&amp;nbsp; Currently&amp;nbsp;you are also aggregating over the continuous variables e and f&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 21:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428938#M22528</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-01-18T21:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Non-convergence after specifying AGGREGATE option in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428947#M22529</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;thanks so much for your reply! You're right, aggregation was for all, i.e. character and numeric covariates in the model. I read before that for defining&amp;nbsp;unique profiles for all observations&amp;nbsp;all variables have to be included. That's why I thought the doubling and weighting of the original dataset could be the problem.&lt;/P&gt;&lt;P&gt;Nevertheless, I re-ran the model without the continuous covariates and indeed, the model converged, but the requested statistic is still not in the output. Here's what the log says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: The Pearson Chi-Square and deviance cannot be computed since there is more than one profile of the explanatory variables within the same profile of the aggregate variables. The SCALE= option is ignored.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: PROC GENMOD is modeling the probability that y='1'.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: The Pearson chi-square and deviance are not computed since the AGGREGATE option is not&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;specified.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: Algorithm converged.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: The scale parameter was held fixed.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't specify the SCALE option. As I got this note before, though, I already tried to define a scale parameter (deviance and Pearson) but that didn't help either.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 22:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428947#M22529</guid>
      <dc:creator>CK1988</dc:creator>
      <dc:date>2018-01-18T22:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Non-convergence after specifying AGGREGATE option in PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428971#M22530</link>
      <description>&lt;P&gt;Your NOTEs do not match the syntax that you supplied. Post the code or log that generates the notes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is working code that you can study/modify.&amp;nbsp; If a model doesn't converge, it is usually a sign that the model does not match the data.&amp;nbsp; If you can duplicate your problem by using the Sashelp.Heart data, please do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc genmod data=sashelp.heart;
class BP_Status Chol_Status Smoking_Status Weight_Status/param=ref;
model Status(ref='Dead')= BP_Status Chol_Status Smoking_Status Weight_Status
         /dist=binomial link=log cl aggregate;
ods exclude ObStats;
ods output ObStats=ObStats;
run;

proc print data=ObStats(obs=10);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Non-convergence-after-specifying-AGGREGATE-option-in-PROC-GENMOD/m-p/428971#M22530</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-01-18T23:45:29Z</dc:date>
    </item>
  </channel>
</rss>

