<?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 in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686029#M33041</link>
    <description>&lt;P&gt;Family_id will be nested within f_region, so try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&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;Key here is that if you just have a few observations within family_id (like &amp;gt;95% are just one) then there may be convergence problems.&amp;nbsp; In this case, you may want to "roll up" the number of cases so that each family_id has a single observation.&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>Wed, 23 Sep 2020 13:06:33 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-09-23T13:06:33Z</dc:date>
    <item>
      <title>Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/685973#M33036</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am investigating individuals being exposed to environmental toxins in early childhood and the risk of development of ADHD. It is a population based cohort study and I did a survival analysis using Poisson regression in proc genmod. Something like this:&lt;/P&gt;&lt;P&gt;proc genmod data=temp order=internal;&lt;/P&gt;&lt;P&gt;class toxin yeargrp SES;&lt;/P&gt;&lt;P&gt;model case=toxin yeargrp SES / dist=poisson link=log offset=lnpyrs type3 covb lrci;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;(lnpyrs are person years)&lt;/P&gt;&lt;P&gt;However, I have been made aware that the data have a&amp;nbsp;multi-level structure (subjects within different regions, below the variable f_region), and the analyses should take account of this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that piecewise exponential survival models partition the duration of follow-up into mutually exclusive intervals and fit a model that assumes that the hazard function is constant within each interval. This is equivalent to a Poisson regression model, so I think I should be able to use Proc glimmix and i ran this syntax.&lt;/P&gt;&lt;P&gt;Proc glimmix&amp;nbsp;data=temp method=quad;&lt;/P&gt;&lt;P&gt;class toxin yeargrp SES f_region;&lt;/P&gt;&lt;P&gt;model case=toxin yeargrp SES f_region/ dist=poisson link=log offset=lnpyrs covb cl solution;&lt;/P&gt;&lt;P&gt;random intercept / subject=f_region;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;But I am really not sure if this is right?, does the subject=f_region mean that that I actually take the region into account?&amp;nbsp;&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>Wed, 23 Sep 2020 08:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/685973#M33036</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-23T08:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686013#M33038</link>
      <description>&lt;P&gt;Yes, the RANDOM statement does mean that you are accounting for the effect of f_region.&amp;nbsp; If you want to see what is going on with that statement, add SOLUTON as an option. It should display the empirical Bayes estimates for each of the levels of f_region.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686013#M33038</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-23T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686017#M33039</link>
      <description>&lt;P&gt;Thank you very much for your reply!&lt;/P&gt;&lt;P&gt;I have another question also &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Some of the individuals in my cohort might be siblings so I think that family should be added as another level to the multilevel model because children from the same family are not "independent" observations so I created a variable family_id in which members of the same family have the same family_id and i tried to add this to the syntax as random intercept / subject=family_id (see below) but I get an error...so how can i incorporate it as another level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc glimmix&amp;nbsp;data=temp method=quad;&lt;/P&gt;&lt;P&gt;class toxin yeargrp SES f_region;&lt;/P&gt;&lt;P&gt;model case=toxin yeargrp SES f_region/ dist=poisson link=log offset=lnpyrs covb cl solution;&lt;/P&gt;&lt;P&gt;random intercept / subject=f_region;&lt;/P&gt;&lt;P&gt;random intercept / subject=family_id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686017#M33039</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-23T12:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686029#M33041</link>
      <description>&lt;P&gt;Family_id will be nested within f_region, so try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&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;Key here is that if you just have a few observations within family_id (like &amp;gt;95% are just one) then there may be convergence problems.&amp;nbsp; In this case, you may want to "roll up" the number of cases so that each family_id has a single observation.&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>Wed, 23 Sep 2020 13:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686029#M33041</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-23T13:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686046#M33042</link>
      <description>&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Yes you are right there will probably be to few observations within each family_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what you mean by "roll up" the number of cases?&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 13:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686046#M33042</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-23T13:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686050#M33043</link>
      <description>&lt;P&gt;Suppose for family_id=1 you have 3 individuals.&amp;nbsp; Currently, you would have each individual in a separate record.&amp;nbsp; By "roll-up", I would get the sum of those three individuals' case counts.&amp;nbsp; You would then analyze cases per family, rather than per individual.&amp;nbsp; This may introduce some overdispersion, so you might want to also consider count distributions that handle overdispersion, such as the negative binomial or generalized Poisson.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686050#M33043</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-23T14:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686052#M33044</link>
      <description>&lt;P&gt;Thanks again, yes I will consider that.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686052#M33044</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-23T14:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686673#M33071</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;I have one last question (I hope :-)).&lt;/P&gt;&lt;P&gt;Some of the individuals in the cohort have missing values in the SES (Socioeconomic status) variable, do you know how missing values are handled?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that STATA&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;drops all observations that have a missing value for any one of the variables used in the model is it the same in SAS?&lt;/SPAN&gt;&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;&amp;nbsp;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 12:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686673#M33071</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-25T12:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686678#M33072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/348680"&gt;@Malthy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those records will not contribute to the fit of the model, just as in STATA.&amp;nbsp; You could impute them using PROC MI and then model average, but that is not for anyone but an experienced user, as feeding in the correct values and variance-covariance matrices is not simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the mixed model procedures in SAS will not delete records with missing values for the random variables or the dependent variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDEnham&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 12:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/686678#M33072</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-25T12:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687136#M33112</link>
      <description>&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;Thank you again for your helpful answers!&lt;/P&gt;&lt;P&gt;So far i have treated the variable toxin as a categorical variable (divided into deciles) and I found the effect of the toxin on my outcome in each decile,&lt;/P&gt;&lt;P&gt;However I would like to investigate the effect on the outcome per 1 unit increase in the toxin treating the toxin variable as continous and I used the same syntax as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc glimmix data=temp method=quad;&lt;/P&gt;&lt;P&gt;class toxin_con yeargrp SES f_region;&lt;/P&gt;&lt;P&gt;model case=toxin_con yeargrp SES / dist=poisson link=log offset=lnpyrs covb cl solution;&lt;/P&gt;&lt;P&gt;random intercept /subject=f_region;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, SAS seems to think that the variable is categorical with 1189 levels and obviously this does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my question is how do i "explain" SAS that this variable should be treated as continous?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 07:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687136#M33112</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-28T07:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687137#M33113</link>
      <description>&lt;P&gt;Do you have a suggestion for this problem?&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Malene&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 07:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687137#M33113</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-28T07:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687186#M33115</link>
      <description>&lt;P&gt;This is an easy one,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/348680"&gt;@Malthy&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Remove toxin_con from the CLASS statement.&amp;nbsp; If you haven't already, be sure the data set is sorted by toxin_con.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687186#M33115</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-28T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel survival analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687199#M33119</link>
      <description>&lt;P&gt;Ah of course &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks again for your help, I really appreciate it!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multilevel-survival-analysis/m-p/687199#M33119</guid>
      <dc:creator>Malthy</dc:creator>
      <dc:date>2020-09-28T13:31:17Z</dc:date>
    </item>
  </channel>
</rss>

