<?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 Mixed models using restricted cubic splines in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674188#M32261</link>
    <description>&lt;P&gt;Hi there - The following code works but only with a very small sample size.&amp;nbsp; My dataset is big and I get an ERROR message when I submit the code using the entire dataset.&amp;nbsp; I have never used GLIMMIX, I'm not familiar with it.&amp;nbsp; I wonder if this model can be run using MIXED instead?&amp;nbsp; Would that help? Or are there any other ways to run this code&amp;nbsp;more efficiently?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;proc glimmix data=xx;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;class studyid;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;effect spl = spline(quarter / details naturalcubic basis=tpf(noint)knotmethod=percentiles(5));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp; model avgdose = spl /s ddfm=kr; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;random int spl /subject = studyid type=vc solution;&amp;nbsp; /*try vc instead of un*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output parameterestimates=sf(keep=effect estimate&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rename=(estimate=overall));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output solutionr=sr(keep=effect subject estimate&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename=(estimate=ssdev));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;run; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;Here is the error I get:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;ERROR: Model is too large to be fit by PROC GLIMMIX in a&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reasonable amount of time on this system. Consider&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; changing your model. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2020 17:56:24 GMT</pubDate>
    <dc:creator>AGabriela</dc:creator>
    <dc:date>2020-08-03T17:56:24Z</dc:date>
    <item>
      <title>Mixed models using restricted cubic splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674188#M32261</link>
      <description>&lt;P&gt;Hi there - The following code works but only with a very small sample size.&amp;nbsp; My dataset is big and I get an ERROR message when I submit the code using the entire dataset.&amp;nbsp; I have never used GLIMMIX, I'm not familiar with it.&amp;nbsp; I wonder if this model can be run using MIXED instead?&amp;nbsp; Would that help? Or are there any other ways to run this code&amp;nbsp;more efficiently?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;proc glimmix data=xx;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;class studyid;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;effect spl = spline(quarter / details naturalcubic basis=tpf(noint)knotmethod=percentiles(5));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp; model avgdose = spl /s ddfm=kr; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;random int spl /subject = studyid type=vc solution;&amp;nbsp; /*try vc instead of un*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output parameterestimates=sf(keep=effect estimate&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rename=(estimate=overall));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output solutionr=sr(keep=effect subject estimate&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename=(estimate=ssdev));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;run; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;Here is the error I get:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;ERROR: Model is too large to be fit by PROC GLIMMIX in a&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reasonable amount of time on this system. Consider&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4472c4;"&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; changing your model. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 17:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674188#M32261</guid>
      <dc:creator>AGabriela</dc:creator>
      <dc:date>2020-08-03T17:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed models using restricted cubic splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674302#M32271</link>
      <description>&lt;P&gt;Three questions: How much memory is available to you,&amp;nbsp; how many quarters are you trying to fit and how many cases do you have (studyid's)?&amp;nbsp; I suspect that your code is generating a lot of knots, and so it ends up with a too many parameters in the optimization compared to the available memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674302#M32271</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-08-04T11:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed models using restricted cubic splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674708#M32285</link>
      <description>&lt;P&gt;Here's a suggestion: First fit a simple model that uses the main effects of QUARTER.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model avgdose = quarter /s ddfm=kr;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the simple model converges and gives reasonable answers that you understand, then try the more complicated model that incorporates spline effects for QUARTER.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674708#M32285</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-08-05T12:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed models using restricted cubic splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674743#M32288</link>
      <description>&lt;P&gt;Thanks for your reply.&amp;nbsp; That's always a good approach.&amp;nbsp; I have done that, though.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674743#M32288</guid>
      <dc:creator>AGabriela</dc:creator>
      <dc:date>2020-08-05T15:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed models using restricted cubic splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674757#M32291</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; Here are the answers:&lt;/P&gt;&lt;P&gt;1) On a regular basis just 32gb, but&amp;nbsp;the IT department doubled that&amp;nbsp;during the weekend.&amp;nbsp; Unfortunately&amp;nbsp;I didn't see a big improvement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Nine quarters.&amp;nbsp; I've tried 3, 4 or 5 knots.&amp;nbsp;&amp;nbsp;As expected, the smaller the number of knots the greater the chance the model will run.&lt;/P&gt;&lt;P&gt;3) If the dataset has 1k people (studyids) or less it runs fine.&amp;nbsp; But unfortunately I have many more people (35k+) on the entire dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Gabriela&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-models-using-restricted-cubic-splines/m-p/674757#M32291</guid>
      <dc:creator>AGabriela</dc:creator>
      <dc:date>2020-08-05T15:44:37Z</dc:date>
    </item>
  </channel>
</rss>

