<?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 PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968364#M48682</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running into an issue with my mixed model, where the addition of the SOLUTION option in the random statement of PROC MIXED drastically affects the fixed effects estimates. Below is the model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=eff method=REML;&lt;BR /&gt;by trtgrpn trtgrp;&lt;BR /&gt;class TRTPN (ref=first) USUBJID STRATAR;&lt;BR /&gt;model AVAL = TRTPN BASE avisitn TIMEK avisitn*TRTPN TIMEK*TRTPN STRATAR / solution ddfm=kr alpha=0.05 cl;&lt;BR /&gt;random INT avisitn TIMEK / sub=USUBJID type=un v;&lt;/P&gt;&lt;P&gt;estimate "Acute Slope, No Response" avisitn 52 avisitn*TRTPN 0 52 / e cl;&lt;BR /&gt;estimate "Acute Slope, Response" avisitn 52 avisitn*TRTPN 52 0/ e cl;&lt;BR /&gt;estimate "Chronic Slope, No Response" avisitn 52 TIMEK 52 avisitn*TRTPN 0 52 TIMEK*TRTPN 0 52 / e cl;&lt;BR /&gt;estimate "Chronic Slope, Response" avisitn 52 TIMEK 52 avisitn*TRTPN 52 0 TIMEK*TRTPN 52 0 / e cl;&lt;BR /&gt;estimate "Difference, Chronic Slope" avisitn*TRTPN 52 -52 TIMEK*TRTPN 52 -52 / e cl;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above model, TRTPN reflects No response vs response, STRATAR reflects a 4 level stratification variable, AVISITN reflects the categorical visit (Week 6 to Week 108), BASE is the baseline value, and TIMEK is the time from change point (Week 6). TRTGRP/TRTGRPN reflects a subgroup of 2 different treatments. The results from this model are as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_0-1749242322131.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107681iE243EC029AA2062C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_0-1749242322131.png" alt="kkutz_0-1749242322131.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I include the S option in the RANDOM statement, the estimates/DF for TRTGRPN = 2 drastically change:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_1-1749242405479.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107682iD1266E6BBD578352/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_1-1749242405479.png" alt="kkutz_1-1749242405479.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_2-1749242483858.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107683i1AAA5B6D9D5AF8A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_2-1749242483858.png" alt="kkutz_2-1749242483858.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on why this might be occurring?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 21:08:48 GMT</pubDate>
    <dc:creator>kkutz</dc:creator>
    <dc:date>2025-06-06T21:08:48Z</dc:date>
    <item>
      <title>PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968364#M48682</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running into an issue with my mixed model, where the addition of the SOLUTION option in the random statement of PROC MIXED drastically affects the fixed effects estimates. Below is the model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=eff method=REML;&lt;BR /&gt;by trtgrpn trtgrp;&lt;BR /&gt;class TRTPN (ref=first) USUBJID STRATAR;&lt;BR /&gt;model AVAL = TRTPN BASE avisitn TIMEK avisitn*TRTPN TIMEK*TRTPN STRATAR / solution ddfm=kr alpha=0.05 cl;&lt;BR /&gt;random INT avisitn TIMEK / sub=USUBJID type=un v;&lt;/P&gt;&lt;P&gt;estimate "Acute Slope, No Response" avisitn 52 avisitn*TRTPN 0 52 / e cl;&lt;BR /&gt;estimate "Acute Slope, Response" avisitn 52 avisitn*TRTPN 52 0/ e cl;&lt;BR /&gt;estimate "Chronic Slope, No Response" avisitn 52 TIMEK 52 avisitn*TRTPN 0 52 TIMEK*TRTPN 0 52 / e cl;&lt;BR /&gt;estimate "Chronic Slope, Response" avisitn 52 TIMEK 52 avisitn*TRTPN 52 0 TIMEK*TRTPN 52 0 / e cl;&lt;BR /&gt;estimate "Difference, Chronic Slope" avisitn*TRTPN 52 -52 TIMEK*TRTPN 52 -52 / e cl;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above model, TRTPN reflects No response vs response, STRATAR reflects a 4 level stratification variable, AVISITN reflects the categorical visit (Week 6 to Week 108), BASE is the baseline value, and TIMEK is the time from change point (Week 6). TRTGRP/TRTGRPN reflects a subgroup of 2 different treatments. The results from this model are as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_0-1749242322131.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107681iE243EC029AA2062C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_0-1749242322131.png" alt="kkutz_0-1749242322131.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I include the S option in the RANDOM statement, the estimates/DF for TRTGRPN = 2 drastically change:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_1-1749242405479.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107682iD1266E6BBD578352/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_1-1749242405479.png" alt="kkutz_1-1749242405479.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_2-1749242483858.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107683i1AAA5B6D9D5AF8A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kkutz_2-1749242483858.png" alt="kkutz_2-1749242483858.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on why this might be occurring?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 21:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968364#M48682</guid>
      <dc:creator>kkutz</dc:creator>
      <dc:date>2025-06-06T21:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968368#M48683</link>
      <description>&lt;P&gt;Hello, It would be helpful if you could include your log and complete output. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 23:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968368#M48683</guid>
      <dc:creator>JackieJ_SAS</dc:creator>
      <dc:date>2025-06-06T23:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968370#M48684</link>
      <description>&lt;P&gt;I am also curious. SOLUTION option of RANDOM statement is just printing out the mixed effect estimated coefficient, would not change its value .&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 00:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968370#M48684</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-06-07T00:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968703#M48702</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response. Below are the logs from the model with SOLUTION specified in the RANDOM statement and without:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_2-1749584930856.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107737i5365E1C795A70738/image-dimensions/400x151?v=v2" width="400" height="151" role="button" title="kkutz_2-1749584930856.png" alt="kkutz_2-1749584930856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kkutz_1-1749584821666.png" style="width: 414px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107736iC0271B80A5DE380E/image-dimensions/414x151?v=v2" width="414" height="151" role="button" title="kkutz_1-1749584821666.png" alt="kkutz_1-1749584821666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The logs appear identical. I attached PDFs of the output from each model. The results for TRTGRP = A are identical but are drastically different for TRTGRP = B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 22:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968703#M48702</guid>
      <dc:creator>kkutz</dc:creator>
      <dc:date>2025-06-10T22:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968724#M48703</link>
      <description>&lt;P&gt;I think you should firstly get rid of the following&amp;nbsp; message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1749603609520.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107743i36F2A406D4002755/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1749603609520.png" alt="Ksharp_0-1749603609520.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 01:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968724#M48703</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-06-11T01:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968752#M48709</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for the log and output. Let's call your two BY conditions 1A and 2B.&amp;nbsp; When you add the SOLUTION option on the RANDOM statement, I see in your output for 2B that the table "Covariance Parameter Estimates" stays the same, whereas the tables "Solutions for Fixed Effects" and "Estimates" change. It is puzzling that the estimates for the covariance parameters stay the same, but the estimates for fixed effects (which are functions of the covariance parms) change. Off hand, I don't know why adding the SOLUTION option on the RANDOM statement should change the model. Maybe the option changes the inverse matrix being used in estimates?&lt;BR /&gt;&lt;BR /&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;mentioned, you do have numerical problems with your model that you should fix.&amp;nbsp; Here is a blog with some more information about the note "Estimated G matrix is not positive definite":&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2019/04/03/g-matrix-is-not-positive-definite.html" target="_blank"&gt;Convergence in mixed models: When the estimated G matrix is not positive definite - The DO Loop&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You do want to do something about a non-positive definite G matrix and don't want to continue with results where that is an issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Some things you could try:&lt;BR /&gt;1) Remove one of AVISITN or TIMEK from the RANDOM statement. This reduces your covariance matrix to make it simpler. I vote for removing AVISITN, since it has a zero variance estimate in your 1A case.&lt;/P&gt;
&lt;P&gt;2) Specify the NOBOUND option on the PROC MIXED statement to allow variance components to be allowed to be negative. I don't have a lot of experience with doing this.&lt;BR /&gt;3) Try forming your covariance structure with a REPEATED statement instead of a RANDOM statement. For example, you could try a spatial power covariance structure with TYPE=SP(POW)(TIMEK).&lt;BR /&gt;4) Run this model in PROC GLIMMIX instead of PROC MIXED. You'd need to remove the METHOD=REML option, but otherwise, I think your code should run without edits. I doubt that using GLIMMIX would do anything about your non-positive G matrix, but it might help with the fact that your output is changing when the SOLUTION option is added.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To really get to the bottom of this, I suggest you contact SAS tech support. Their help is included with your license:&lt;BR /&gt;&lt;A href="https://support.sas.com/en/technical-support.html#contact" target="_blank"&gt;SAS Technical Support | SAS Support&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 15:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/968752#M48709</guid>
      <dc:creator>JackieJ_SAS</dc:creator>
      <dc:date>2025-06-11T15:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROX MIXED Random Solution Drastically Changing Fixed Effects Estimation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/969137#M48719</link>
      <description>&lt;P&gt;Would you be willing to try an experiment that might help us diagnose the issue?&lt;/P&gt;
&lt;P&gt;I would be very interested in knowing what happens if you use WHERE clauses instead of the BY statement. Could you try the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Remove the BY statement.&lt;/LI&gt;
&lt;LI&gt;Add the following statement:&lt;BR /&gt;WHERE trtgrpn=1 AND trtgrp='A';&lt;/LI&gt;
&lt;LI&gt;On the RANDOM statement, remove the SOLUTION option.&lt;/LI&gt;
&lt;LI&gt;Change the ODS OUTPUT statement to be &lt;BR /&gt;ODS OUTPUT Estimates=Est_No_Soln;&lt;/LI&gt;
&lt;LI&gt;Run the procedure.&lt;/LI&gt;
&lt;LI&gt;On the RANDOM statement, specify the SOLUTION option.&lt;/LI&gt;
&lt;LI&gt;Change the ODS OUTPUT statement to be &lt;BR /&gt;ODS OUTPUT Estimates=Est_Soln;&lt;/LI&gt;
&lt;LI&gt;Run the procedure.&lt;/LI&gt;
&lt;LI&gt;Compare the Est_no_Soln and Est_Soln datasets.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you get different results, please use PROC PRINT to show both datasets.&lt;/P&gt;
&lt;P&gt;If you do not get different results, please run the other three cases that are handled by the BY statement:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;WHERE trtgrpn=1 AND trtgrp='B';&lt;/LI&gt;
&lt;LI&gt;WHERE trtgrpn=2 AND trtgrp='A';&lt;/LI&gt;
&lt;LI&gt;WHERE trtgrpn=2 AND trtgrp='B';&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;By getting rid of the BY statement, we can focus on the subset of the data that is causing the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 17:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROX-MIXED-Random-Solution-Drastically-Changing-Fixed-Effects/m-p/969137#M48719</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-06-16T17:40:23Z</dc:date>
    </item>
  </channel>
</rss>

