<?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: Multilevel survival analysis using proc glimmix in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694230#M33512</link>
    <description>&lt;P&gt;When you say "does not converge", the first thing I look for is an NLOPTIONS statement, where you can increase the number of iterations beyond the default 20.&amp;nbsp; For now try adding&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;nloptions maxiter=1000;&lt;/PRE&gt;
&lt;P&gt;If you still do not converge, then look at this paper for some really good ideas about improving convergence in mixed models:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&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;&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;</description>
    <pubDate>Mon, 26 Oct 2020 13:26:42 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-10-26T13:26:42Z</dc:date>
    <item>
      <title>Multilevel survival analysis using proc glimmix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694097#M33503</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in a longitudinal cohort study I am investigating individuals being exposed to environmental toxins in early childhood and their risk of developing ADHD. The data has a multilevel structure (subjects within families (family_id) within different regions, below the variable f_region) and I used Proc Glimmix and ran the syntax below.&amp;nbsp;(lnpyrs are person years)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-sas"&gt;&lt;CODE&gt;Proc glimmix data=temp method=quad;
class toxin yeargrp SES f_region family_id;
model case=toxin yeargrp SES/ dist=poisson link=log offset=lnpyrs covb cl solution;
random intercept / subject=f_region;
random intercept / subject=family_id(f_region);

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, I have a problem when I include families (family_id) in the multilevel model because there are too few individuals in each strata or maybe to many strata...anyhow the model does not converge. Does anyone have a suggestion how to handle this problem?&lt;/P&gt;&lt;P&gt;I need to keep the individual level and I cannot exclude siblings.&lt;/P&gt;&lt;P&gt;I have been told that some take clustering into account by estimating clustered standard errors e.g. by the repeated statement in proc genmod but is there a similar option in proc glimmix ?&lt;/P&gt;&lt;P&gt;I hope to hear from some of you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 12:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694097#M33503</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-10-25T12:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis using proc glimmix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694230#M33512</link>
      <description>&lt;P&gt;When you say "does not converge", the first thing I look for is an NLOPTIONS statement, where you can increase the number of iterations beyond the default 20.&amp;nbsp; For now try adding&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;nloptions maxiter=1000;&lt;/PRE&gt;
&lt;P&gt;If you still do not converge, then look at this paper for some really good ideas about improving convergence in mixed models:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&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;&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;</description>
      <pubDate>Mon, 26 Oct 2020 13:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694230#M33512</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-26T13:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis using proc glimmix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694304#M33516</link>
      <description>&lt;P&gt;Thanks again for your response &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when i write the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;nloptions maxiter=1000;&lt;/PRE&gt;&lt;P&gt;I get this error "the sas system stopped processing this step because of insufficient memory"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have approximately 900 000 individuals in my cohort which means that my fam_id has about 400 000 strata and some strata only include 1 individual&lt;/P&gt;&lt;P&gt;I just tried proc genmod and included the repeated subject=fam_id and I have the same problem... convergence problems and insufficient memory...is it because I have too many strata with too few individuals?&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 17:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694304#M33516</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-10-26T17:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis using proc glimmix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694308#M33517</link>
      <description>&lt;P&gt;It is the problem, in the sense that you present it.&amp;nbsp; I suppose if you had terabytes of CPU that wouldn't be a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can be done? First, you need to consolidate some of these.&amp;nbsp; You have region, family within region, and individual within family (=residual).&amp;nbsp; An R side approach in GLIMMIX may be useful (but I worry about twins under this approach). Consider family as a repeated measure within region.&amp;nbsp; If you aggregate at the family level, and assign a weight = number of family members, this might work (no guarantees, though):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc glimmix data=temp;
class toxin yeargrp SES f_region ;&lt;BR /&gt;nloptions maxiter=500 tech=nrridg;
model case=toxin yeargrp SES f_region/ dist=poisson link=log offset=lnpyrs covb cl solution;
random f_region/residual subject=family_id type=cs;
weight = famnumbers;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are some important considerations here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, you need a unique numeric family_id for each family so that it can be treated as a continuous variable,&amp;nbsp; It would be a good idea to sort the dataset by this variable.&lt;/P&gt;
&lt;P&gt;Second, toxin yeargrp and SES may have different effects in each region.&amp;nbsp; This model would give the marginal effects averaged over region.&amp;nbsp; To get effects for each region, you would have to specify interactions.&lt;/P&gt;
&lt;P&gt;Third, case will have to be aggregated on a family level.&amp;nbsp; This part is not too difficult using PROC MEANS, which would also give the number of observations for each family (famnumbers).&amp;nbsp; The join on the design matrix (original dataset) may be difficult.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My fear is that if the clustered SD approach failed in GENMOD due to memory constraints, then it will happen here as well.&amp;nbsp; Jack-knifing the big dataset into smaller sets that will run, and then consolidating the results, might be an approach to consider then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 17:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis-using-proc-glimmix/m-p/694308#M33517</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-26T17:44:58Z</dc:date>
    </item>
  </channel>
</rss>

