<?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 Variables order in proc mixed in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180759#M46047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using different variables order in proc mixed, I get different results. For example with the following SAS program:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;proc mixed data=table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class trt center study visit subject;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model change = &lt;STRONG&gt;baseline&lt;/STRONG&gt; visit trt center*study trt*visit baseline*visit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repeated visit / type=un subject=subject;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmeans trt*visit / pdiff cl alpha = 0.05;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;the model doesn't converge, whereas if the variables in the model statement are in the following order: &lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;model change = visit trt center*study trt*visit &lt;STRONG&gt;baseline&lt;/STRONG&gt; baseline*visit; &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;(the only difference is the order of the baseline variable) then the model converges .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;How this could be explained as the variables order should not impact the results?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Many thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2014 14:59:34 GMT</pubDate>
    <dc:creator>GDAL</dc:creator>
    <dc:date>2014-06-02T14:59:34Z</dc:date>
    <item>
      <title>Variables order in proc mixed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180759#M46047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using different variables order in proc mixed, I get different results. For example with the following SAS program:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;proc mixed data=table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class trt center study visit subject;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model change = &lt;STRONG&gt;baseline&lt;/STRONG&gt; visit trt center*study trt*visit baseline*visit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repeated visit / type=un subject=subject;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmeans trt*visit / pdiff cl alpha = 0.05;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;the model doesn't converge, whereas if the variables in the model statement are in the following order: &lt;SPAN style="color: #3366ff; font-size: 8pt;"&gt;model change = visit trt center*study trt*visit &lt;STRONG&gt;baseline&lt;/STRONG&gt; baseline*visit; &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;(the only difference is the order of the baseline variable) then the model converges .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;How this could be explained as the variables order should not impact the results?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Many thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 14:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180759#M46047</guid>
      <dc:creator>GDAL</dc:creator>
      <dc:date>2014-06-02T14:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variables order in proc mixed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180760#M46048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The sweep operator.&amp;nbsp; During the multiple matrix inversions, the order of columns can affect many of the calculations, especially if there is collinearity (which is to be expected, at least a bit, with baseline and baseline*visit in the model).&amp;nbsp; I have found it always seems like a good idea to list any continuous variables last in the model statement to try to get around this kind of behavior.&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>Tue, 03 Jun 2014 12:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180760#M46048</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-06-03T12:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variables order in proc mixed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180761#M46049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Always put categorical variables first and then continuous in model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manjusha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variables-order-in-proc-mixed/m-p/180761#M46049</guid>
      <dc:creator>Manjusha_Gondil</dc:creator>
      <dc:date>2014-06-27T11:35:31Z</dc:date>
    </item>
  </channel>
</rss>

