<?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: Longitudinal growth model using proc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672612#M32184</link>
    <description>Thanks. I have about 5-7 time-point observations per level of hospitalid. The overall distribution of complication rates is pretty normally distributed. I did try to model model as a binomial in glimmix just to compare, but realized that may be problematic since the outcome is not an integer value (i.e. it is not 0/1 but rather 2.4, for example).&lt;BR /&gt;&lt;BR /&gt;I noticed one other things that seemed unusual: if I am not misunderstanding, it seems that to use proc mixed and put a random coefficient on time, along with a repeated statement, the "time" variable needs to be entered in the class statement. That would seem unusual, because it would prevent testing a linear fixed effect on time. Am I mistaken? Thank you!&lt;BR /&gt;</description>
    <pubDate>Mon, 27 Jul 2020 16:39:11 GMT</pubDate>
    <dc:creator>jgreenberg321</dc:creator>
    <dc:date>2020-07-27T16:39:11Z</dc:date>
    <item>
      <title>Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672419#M32157</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to model change in average hospital complication rates over time using proc mixed. I've tried reading articles online regarding the appropriate syntax for specifying this but want to make sure I am interpreting the results correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;mixed&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;=have;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;class&lt;/SPAN&gt; hospitalid;&lt;/P&gt;&lt;P class="p2"&gt;model&lt;SPAN class="s3"&gt; complicated_rate=time/&lt;/SPAN&gt;solution chisq&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;random&lt;/SPAN&gt; intercept time/&lt;SPAN class="s2"&gt;type&lt;/SPAN&gt;=un &lt;SPAN class="s2"&gt;subject&lt;/SPAN&gt;=hospitalid_index &lt;SPAN class="s2"&gt;g&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;vc&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;However, my questions are as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;1) I tried specifying autocorrelation with "type=ar(1)" in my random statement, and my AIC was substantially larger. I assume that is indicating the model is better fit without specifying autocorrelation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;2) How can I request a significance test on my random effects (i.e. does the effect of time vary significantly across hospitals)?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2020 22:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672419#M32157</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-26T22:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672456#M32166</link>
      <description>&lt;P&gt;You specify &lt;EM&gt;hospitalid&lt;/EM&gt; in the CLASS statement, but subject = &lt;EM&gt;hospitalid_index&lt;/EM&gt; in the RANDOM statement.&lt;/P&gt;
&lt;P&gt;What is the difference between &lt;EM&gt;hospitalid&lt;/EM&gt; and &lt;EM&gt;hospitalid_index&lt;/EM&gt;? How many levels of &lt;EM&gt;hospitalid &lt;/EM&gt;are in your dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do your results change if you use &lt;EM&gt;hospitalid&lt;/EM&gt; as the subject in the RANDOM statement with type=UN?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The RANDOM statement models a 2 x 2 covariance structure, with the intercept variance and slope variance on the diagonal, and the covariance of intercept and slope on the off-diagonal. Using type=ar(1) on the RANDOM statement is nonsensical and does not do what you want. Logically, the off-diagonal elements in the covariance matrix are not autocorrelated (although it's a moot point when there is only one covariance), and more importantly you do not want homogeneous (i.e., equal) variances for intercept and slope. The &lt;EM&gt;residuals&lt;/EM&gt; from the regression of &lt;EM&gt;complicated_rate&lt;/EM&gt; on &lt;EM&gt;time&lt;/EM&gt; might be autocorrelated, but that would be addressed by the REPEATED statement in Proc MIXED.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you plotted &lt;EM&gt;complicated_rate&lt;/EM&gt; versus &lt;EM&gt;time&lt;/EM&gt; by &lt;EM&gt;hospitalid_index&lt;/EM&gt; to visually assess whether there is a relationship with time (and whether it appears linear), whether variance among intercepts is appreciable, and whether variance among slopes is appreciable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You likely would find &lt;A href="https://www.amazon.com/SAS-Mixed-Models-Introduction-Applications/dp/163526135X" target="_self"&gt;SAS for Mixed Models: Introduction and Basic Applications&lt;/A&gt; by Stroup et al. informative, especially Ch 10 on random coefficients models. You'll notice that in their examples, they do not model autocorrelation of residuals; some people do, some people don't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Leaping to your questions:&lt;/P&gt;
&lt;P&gt;Q1: No, using type=ar(1) is wrong.&lt;/P&gt;
&lt;P&gt;Q2: I would switch to Proc GLIMMIX and use the COVTEST statement: &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_glimmix_syntax06.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;GLIMMIX documentation for COVTEST&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps move you forward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 05:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672456#M32166</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2020-07-27T05:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672509#M32175</link>
      <description>&lt;P&gt;There is a way to use an autoregressive error structure, but it requires separating time and hospitalid into a REPEATED statement and a RANDOM statement, respectively.&lt;/P&gt;
&lt;P&gt;This would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=have;
class hospitalid;
model complicated_rate=time/solution chisq;
random intercept /subject=hospitalid ;
repeated time/type=ar(1) subject=hospitalid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&amp;nbsp;points out why you can't have a single random statement with intercept and time, and an AR(1) error structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now if you wish to model heterogeneity of variance by time, you could look at type=arh(1) in the repeated statement, and compare AICC values to select a potential error structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last, and maybe most importantly, what sort of variable is complicated_rate?&amp;nbsp; Is it a proportion, that could possibly be put into the form (# of patients with complications/ total # of patients).&amp;nbsp; If so, you may want to shift to PROC GLIMMIX, where you can fit this as a binomial variable.&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, 27 Jul 2020 12:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672509#M32175</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-27T12:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672516#M32177</link>
      <description>&lt;P&gt;Thank you both for the feedback. That helps to clarify a lot regarding the appropriate syntax structure. To follow-up a few points:&lt;/P&gt;&lt;P&gt;1) The trend does look approximately linear when plotted across time, and visually there does seem to heterogeneity across cluster.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Regarding the outcome variable: the variable is essentially a binomial proportion (i.e. proportion of cases that had a complication). I had initially planned to use Glimmix, but didn't when the overall plot of the complication rates looked very much normally distributed. Would you still recommend modeling the event as a binomial outcome? Is the structure of the syntax (i.e. the repeated statement) generally the same when using Glimmix rather than proc mixed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 12:56:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672516#M32177</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-27T12:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672545#M32180</link>
      <description>&lt;P&gt;If the distribution is relatively unskewed, assuming normal errors probably is OK, but it depends on the number of observations for each level of hospitalid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as repeated measures in GLIMMIX, there is no REPEATED statement.&amp;nbsp; You use a RANDOM statement with a residual option if you are fitting using pseudo-likelihood (recently recommended by Stroup and Claassen (2020), or model the "repeatedness" as a G-side random effect with a maximum likelihood method (type=laplace or type=quad).&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 14:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672545#M32180</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-27T14:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672612#M32184</link>
      <description>Thanks. I have about 5-7 time-point observations per level of hospitalid. The overall distribution of complication rates is pretty normally distributed. I did try to model model as a binomial in glimmix just to compare, but realized that may be problematic since the outcome is not an integer value (i.e. it is not 0/1 but rather 2.4, for example).&lt;BR /&gt;&lt;BR /&gt;I noticed one other things that seemed unusual: if I am not misunderstanding, it seems that to use proc mixed and put a random coefficient on time, along with a repeated statement, the "time" variable needs to be entered in the class statement. That would seem unusual, because it would prevent testing a linear fixed effect on time. Am I mistaken? Thank you!&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Jul 2020 16:39:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672612#M32184</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-27T16:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672646#M32188</link>
      <description>&lt;P&gt;A few thoughts regarding whether to use a normal distribution for proportions, or a binomial distribution for (number of complications)/(number of cases):&lt;/P&gt;
&lt;P&gt;(1) I would think that both (number of complications) and (number of cases) would be integers, so I'm puzzled by your statement that the outcome is not an integer. But then I don't fully know your study.&lt;/P&gt;
&lt;P&gt;(2) The binomial approach is preferable if (number of cases) is variable, or if the proportion of complications is small (or large), or if the (number of cases) is small such that proportion of cases is relatively discrete.&lt;/P&gt;
&lt;P&gt;(3) Distributional assumptions apply not to the overall (meaning all observations combined) set of response data but rather to the response &lt;EM&gt;conditional on the predictors&lt;/EM&gt;, which is why we often use residual diagnostics to assess distributional assumptions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good spotting on the use of &lt;EM&gt;time&lt;/EM&gt;. The solution to that is to have two copies of &lt;EM&gt;time&lt;/EM&gt;, one continuous and one categorical:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set have;
time_c = time;
run;

proc mixed data=have;
class hospitalid time_c;
model complicated_rate=time/solution chisq;
random intercept /subject=hospitalid ;
repeated time_c / type=ar(1) subject=hospitalid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This combination of RANDOM and REPEATED with AR(1) is referred to as "AR(1)+RE"; see &lt;A href="https://pubmed.ncbi.nlm.nih.gov/10861779/" target="_self"&gt;Littell et al. (2000) Modelling covariance structure in the analysis of repeated measures data&lt;/A&gt; for a nice description of the distinction between this structure and plain AR(1) (which you would implement by keeping the REPEATED statement and omitting the RANDOM statement). In my practice, with small datasets, I usually have estimation trouble with AR(1)+RE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 18:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672646#M32188</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2020-07-27T18:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672664#M32189</link>
      <description>&lt;P&gt;Thank you for the detailed explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To clarify the outcome, it's a risk-adjusted complication rate on the hospital level. I'm not directly measuring/modeling the number of 0's and 1's in this context.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the rest of your explanation, that all makes sense. I have found that trying to add some complexity to these models does create some problems with convergence, as you mentioned. Practically, I am primarily interested in the fixed effect estimate of time, which is easier to model. Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 18:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672664#M32189</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-27T18:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672778#M32197</link>
      <description>&lt;P&gt;Oh.&amp;nbsp; So an individual may have more than one complication&amp;nbsp; The numerator is number of complications rather than number of patients who have at least one complication, adjusted for risk prevalence (assumption on the latter)&amp;nbsp; Normal seems pretty good then.&amp;nbsp; What does a QQ plot of the residuals look like? It that doesn't show any signs of variance dependence on the value, you should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 11:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672778#M32197</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-28T11:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672817#M32202</link>
      <description>Well, it's a risk-adjusted rate per hospital per year. It's actually calculated as the total predicted number of events over the total number of expected, per year. Therefore the numbers are generally non-integer values.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Jul 2020 13:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672817#M32202</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-28T13:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672819#M32203</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Sorry- the qq plot looks pretty good. There is some deviation out at the upper end of the data but quite linear over most of the data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 13:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672819#M32203</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-28T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672840#M32204</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329408"&gt;@jgreenberg321&lt;/a&gt;&amp;nbsp;:In the immortal words of Leroy Jethro Gibbs, "Never apologize. It's a sign of weakness."&amp;nbsp; Everything you have says use a normal distribution.&amp;nbsp; Well done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 14:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672840#M32204</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-28T14:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal growth model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672843#M32205</link>
      <description>Ha! Thank you— and thank you for your help!&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Jul 2020 14:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Longitudinal-growth-model-using-proc-mixed/m-p/672843#M32205</guid>
      <dc:creator>jgreenberg321</dc:creator>
      <dc:date>2020-07-28T14:11:10Z</dc:date>
    </item>
  </channel>
</rss>

