<?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: MIXED or NLMIXED for nonlinear outcome? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183233#M9516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented all suggestions Steve; it worked great and the work is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using only one random statement reduced computing times markedly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sp(pow) brought parameter estimates closer to what descriptive data indicate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Jan 2014 16:50:03 GMT</pubDate>
    <dc:creator>Adam1</dc:creator>
    <dc:date>2014-01-04T16:50:03Z</dc:date>
    <item>
      <title>MIXED or NLMIXED for nonlinear outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183229#M9512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;I'm trying to model a continuous outcome variable (blood pressure) against categorical and continuous predictors. The study is longitudinal, includes several observations for each individual and follow up is between 5 and 10 years. I am interested in examining how treatment group impacts blood pressure. For all treatment groups the value of the outcome (blood pressure) decrease the first 3-4 years and then increases steadily the remaning years in the study. Initially i used PROC MIXED with random effects for person (repeated measurements), treatment group (individuals where nested within treatment groups) and follow up time. Here is the code:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;proc mixed data = DATASET covtest noclprint method=reml;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;class Person_ID Treatment_Group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;model bloodpressure = followup followup*followup Treatment_Group / solution ddfm = satterthwaite;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;random intercept / sub=Person_ID type=ar(1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;random intercept / sub=Person_ID (Treatment_Group) type=ar(1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thus, in order to manage the nonlinear outcome i squared the time variable (followup). This rendered parameter estimates more credible. So, the non-linear outcome could be accounted for in PROC MIXED by this method.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Should i prefer doing this in PROC NLMIXED?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Note that SAS performed my analysis, which included almost a million observations, in 20 minutes; extremely fast compared to other software.mixed &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Dec 2013 10:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183229#M9512</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2013-12-28T10:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED or NLMIXED for nonlinear outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183230#M9513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would stay with MIXED, unless the quadratic nature doesn't capture the actual nonlinearity.&amp;nbsp; I would offer the following though:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Center followup before fitting it in the model.&amp;nbsp; The quadratic term may be generating extremely large leverage realtive to the other terms.&lt;/P&gt;&lt;P&gt;Use ddfm=kenwardrogers--it applies the Satterthwaite approximation plus makes adjustments for the correlations in estimating the standard errors.&lt;/P&gt;&lt;P&gt;And that brings up the random statements.&amp;nbsp; You could replace the two statements with;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random intercept Treatment_Group/subject=PersonID ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand how type=ar(1) applies correctly here, though.&amp;nbsp; This doesn't look like a repeated measures structure, as I don't see the intercept as something that varies with time (I could be wrong here, and may be about to learn something new, though).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, this model assumes that the time course for all treatment groups is identical, shifting only the intercept as measured by Treatment_Group.&amp;nbsp; I would think that if there was a group effect, it would also change the time course.&amp;nbsp; To look for that, try the following model statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;model bloodpressure = followup_c followup_c*followup_c Treatment_Group Treatment_Group*followup_c Treatment_Group*followup_c*followup_c/solution ddfm=kenwardrogers; /*followup_c is the centered follow up time */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your method fits a smooth curve.&amp;nbsp; If the followup times fit a reasonable number of discrete time points, you may be able to fit this as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;proc mixed data = DATASET covtest noclprint method=reml;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;class Person_ID Treatment_Group followup_cat;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;model bloodpressure = Treatment_Group|followup_cat/ solution ddfm = kenwardrogers;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;random intercept / sub=Person_ID ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;repeated followup_cat / sub=Person_ID (Treatment_Group) type=ar(1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This allows for a "non-smooth" time effect, and eliminates the need to construct a second-order time term.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 17:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183230#M9513</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-30T17:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED or NLMIXED for nonlinear outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183231#M9514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sincerely appreciate the detailed and educating reply Steve. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took your advice; I grand mean centered continuous predictors (incl followup), however I did not center the outcome (assuming interpretations would be more straight forward).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I applied all your advice at once, I could not conclude which one of these resulted in:&lt;/P&gt;&lt;P&gt;1) Running the models now take 5-10 minutes (500'000 observations tested) which is several times faster.&lt;/P&gt;&lt;P&gt;2) 'Followup' and 'Followup*Followup' are significant as fixed effects (solutions), however the type 3 test results in a non significant 'followup'.&lt;/P&gt;&lt;P&gt;3) There were several interactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not fit Your last model since repeated measuresments are spaced (in time) very unequally for individuals in the study.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will run the models tomorrow and post some results here, in case that would be interesting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;Happy new years!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 15:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183231#M9514</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2013-12-31T15:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED or NLMIXED for nonlinear outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183232#M9515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two points:&amp;nbsp; Watch out for comparing the results from the solution to the type 3 tests when there are interactions.&amp;nbsp; Trust the type 3 tests to tell you what is going on.&amp;nbsp; Also, the interactions are more important than the main effects when it comes to analysis of covariance (which is what this is).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, unequal spacing can be handled a couple of ways.&amp;nbsp; The spatial power structure is one that is used when the subjects have different spacing,&amp;nbsp; Another possibility is fitting a spline to the data, with missing values inserted for subjects as needed to complete the time effect.&amp;nbsp; However, with a very large dataset, that seems too time consuming to even consider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denhjam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 16:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183232#M9515</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-31T16:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED or NLMIXED for nonlinear outcome?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183233#M9516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented all suggestions Steve; it worked great and the work is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using only one random statement reduced computing times markedly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sp(pow) brought parameter estimates closer to what descriptive data indicate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 16:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-or-NLMIXED-for-nonlinear-outcome/m-p/183233#M9516</guid>
      <dc:creator>Adam1</dc:creator>
      <dc:date>2014-01-04T16:50:03Z</dc:date>
    </item>
  </channel>
</rss>

