<?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: GLIMMIX 3-level model stops with &amp;quot;insufficient memory&amp;quot; error...2-level runs fine. in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/734264#M35623</link>
    <description>If you could switch into PROC GEE ,instead of Mixed model .</description>
    <pubDate>Thu, 15 Apr 2021 13:04:32 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-04-15T13:04:32Z</dc:date>
    <item>
      <title>GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733757#M35602</link>
      <description>&lt;P&gt;I'm trying to fit a 3-level model with hospital admissions (n=32,052) nested within patients (n=19,811) nested within hospital site (n=9). I'm using several categorical and binary variables as fixed effects to predict a binary outcome. I want to know if certain encounter characteristics (insurance, admission source) and patient characteristics (age, sex, race, language, alcohol/drug use, housing status) predict physical restraint use and whether this varies by site.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=data ITDETAILS ;
CLASS 
    AgeGrp Race Gender Ethnicity Language Insurance Site Alcohol Drug 
    MHealth Homeless PatID AdmitSource 
 ;
model Restraint (descending)= 
    AgeGrp Gender Race Ethnicity Language Insurance Alcohol Drug MHealth
    Homeless AdmitSource
    / CL DIST=BINARY LINK=LOGIT SOLUTION ODDSRATIO DDFM=BW;
random intercept / subject=PatID(Site);
random intercept / subject=Site;
COVTEST / WALD;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;1. The above code gives an insufficient memory error. I'm using SAS EG with default settings and don't have access to the config file to increase MEMSIZE, but I'm in touch with IT and hope they can adjust it. Is this typical? It doesn't seem like an overly complicated model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Encounters are uniquely clustered in patients, but patients can have different site visits. Would this have an impact? Do I need to adjust for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. When I run the 2-level model (with the below random line as the only random line) with encounters clustered within patients, it runs fine and the results/fit look good, but I have a nitpicky reviewer asking about Site random effect and want to figure this out.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;random intercept / subject=PatientID;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733757#M35602</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-14T14:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733759#M35603</link>
      <description>&lt;P&gt;Memory issues are not due to the complexity of the model but rather due to the number of distinct levels of patients (and number of levels of all of your class variables).&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733759#M35603</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-04-14T14:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733766#M35604</link>
      <description>&lt;P&gt;Ok, good to know. The predictors all have &amp;lt;=5 categories, however there are ~20,000 distinct patients, which I assume is the culprit here? Having said that, the code with only encounters nested within patients does run ok.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;random intercept / subject=PatID;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It's only when you add the 2nd Random line with Site, that it gives the memory error. But, Site only has 9 levels.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is my only recourse to increase MEMSIZE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733766#M35604</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-14T14:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733846#M35608</link>
      <description>&lt;P&gt;I would try using METHOD=QUAD(FASTQUAD) to estimate the model.&amp;nbsp; For more information on FASTQUAD option refer to the following SAS Note:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/60666" target="_blank"&gt;http://support.sas.com/kb/60666&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also suggest listing your RANDOM statements from least complex to most complex.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;random intercept &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; subject&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;Site&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;random intercept &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; subject&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function keyword"&gt;PatID&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Site&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to provide a data set I can see if there are other recommendations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kathleen&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 17:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733846#M35608</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-04-14T17:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733855#M35610</link>
      <description>&lt;P&gt;Hi Kathleen, thanks for the response. I have tried using method=quad(fastquad), but it still gives the memory error. As explained here (&lt;A href="https://support.sas.com/resources/papers/proceedings12/332-2012.pdf" target="_self"&gt;https://support.sas.com/resources/papers/proceedings12/332-2012.pdf&lt;/A&gt;&amp;nbsp;), I altered the code to look like the below and it does run, but I'm not able to use the method=quad option with the "_residual_" added and thus, can't get the AIC fit statistics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;random intercept / subject=SiteCD solution;&lt;BR /&gt;random _residual_ / subject=PatID(SiteCD) solution;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 17:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/733855#M35610</guid>
      <dc:creator>NMB82</dc:creator>
      <dc:date>2021-04-14T17:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/734214#M35621</link>
      <description>&lt;P&gt;Stroup and Claassen recently published a paper comparing pseudolikelihood methods to quadrature methods.&amp;nbsp; In particular, they spend a lot of time on binomial response models.&amp;nbsp; Their findings indicate that for most cases, pseudolikelihood (linearization) performs at least as well, if not better, than quadrature.&amp;nbsp; Here is the reference:&amp;nbsp;&amp;nbsp;Journal of Agricultural, Biological and Environmental Statistics volume 25, pages 639–656.&amp;nbsp; This is freely available if you have an ASA membership, but is otherwise behind a paywall.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 12:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/734214#M35621</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-04-15T12:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX 3-level model stops with "insufficient memory" error...2-level runs fine.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/734264#M35623</link>
      <description>If you could switch into PROC GEE ,instead of Mixed model .</description>
      <pubDate>Thu, 15 Apr 2021 13:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLIMMIX-3-level-model-stops-with-quot-insufficient-memory-quot/m-p/734264#M35623</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-04-15T13:04:32Z</dc:date>
    </item>
  </channel>
</rss>

