<?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: too many categories for GLIMMIX? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190997#M48117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;Thank you for all those suggestions. I will try them and get back here.&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2014 14:19:35 GMT</pubDate>
    <dc:creator>medea</dc:creator>
    <dc:date>2014-07-23T14:19:35Z</dc:date>
    <item>
      <title>too many categories for GLIMMIX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190995#M48115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am modelling hospital mortality data (dichotomous rsponse variable)&amp;nbsp;&amp;nbsp; using GLIMMIX at three levels: patient, doctor, hospital. I have over 3million patients, about 80,000 doctors and about 70 hospitals. My code looks like:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="background: white; color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;glimmix&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=mortality method=quad;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; doctor hospital;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; death(event=1)= patient_covariates hospital_covariates doctor_covariates doctor hospital/&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=b s&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; intercept/ subject=hospital;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; intecept /subject=doctor(hospital)&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;I can not make this model to converge. I wonder whether I have too many levels on the 'doctor' variable which has so many lavels?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Any help would be appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 12:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190995#M48115</guid>
      <dc:creator>medea</dc:creator>
      <dc:date>2014-07-23T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: too many categories for GLIMMIX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190996#M48116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is a possibility.&amp;nbsp; One thing you might try is giving each doctor a unique NUMERICAL id, and then removing doctor from the class statement.&amp;nbsp; I would also remove the fixed effects of doctor and hospital from the MODEL statement.&amp;nbsp; Also, change from dist=b, which is a binomial and more suited to aggregated data, to dist=binary, to reflect the 0/1 nature of your data.&amp;nbsp; Consider changing from method=quad to method=laplace.&amp;nbsp; And finally, when you say that the model does not converge, I suspect that you are hitting the 20 iteration default and getting a message, rather than letting the procedure iterate as much as needed.&amp;nbsp; Try adding and NLOPTIONS statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nloptions maxiter=1000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 14:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190996#M48116</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-23T14:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: too many categories for GLIMMIX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190997#M48117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;Thank you for all those suggestions. I will try them and get back here.&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 14:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190997#M48117</guid>
      <dc:creator>medea</dc:creator>
      <dc:date>2014-07-23T14:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: too many categories for GLIMMIX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190998#M48118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;Steve,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;I made all the suggested changes (except making my DOCTOR_ID&lt;BR /&gt;Numerical). I am happy to report that the code has&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;converged (GCONV=1E-8) as displayed in my Log window, HOWEVER,&lt;BR /&gt;it is taking a very long time to finish. I set the code running yesterday at&lt;BR /&gt;4pm(GMT) and it is still running…&amp;nbsp; 18hrs and counting. I am very tempted&lt;BR /&gt;to let it run over the weekend, but wonder whether it is really working or has&lt;BR /&gt;it got stuck somewhere? No error messages though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Regards &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 09:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190998#M48118</guid>
      <dc:creator>medea</dc:creator>
      <dc:date>2014-07-25T09:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: too many categories for GLIMMIX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190999#M48119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a good chance that the likelihood is in a very flat space and is essentially just thrashing around a fixed point.&amp;nbsp; You might try adding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pconv=1e-6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to the proc glimmix call.&amp;nbsp; If all parameters are relatively stable (which is what this checks) you should be good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/too-many-categories-for-GLIMMIX/m-p/190999#M48119</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-28T14:26:16Z</dc:date>
    </item>
  </channel>
</rss>

