<?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 linear combinations in mixed models in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139394#M7304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know how to create linear combinations using proc mixed or plm? In Stata, the syntax is lincom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you were to model the change in gallons of ice cream consumed for 6 months in a particular population, with data collected at each month. Contrast and lsmestimates can be used to compare the predicted means for each month (ie ice cream at 1 vs 2 months), but how can I test if the change from 1 to 2 months is different from the change from 2 to 3 months. The basic model would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;mixed&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=heatwave;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;class id month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;model icecream=month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;random int /subject=id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Nov 2013 07:26:03 GMT</pubDate>
    <dc:creator>ehowie</dc:creator>
    <dc:date>2013-11-12T07:26:03Z</dc:date>
    <item>
      <title>linear combinations in mixed models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139394#M7304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know how to create linear combinations using proc mixed or plm? In Stata, the syntax is lincom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you were to model the change in gallons of ice cream consumed for 6 months in a particular population, with data collected at each month. Contrast and lsmestimates can be used to compare the predicted means for each month (ie ice cream at 1 vs 2 months), but how can I test if the change from 1 to 2 months is different from the change from 2 to 3 months. The basic model would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;mixed&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=heatwave;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;class id month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;model icecream=month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;random int /subject=id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 07:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139394#M7304</guid>
      <dc:creator>ehowie</dc:creator>
      <dc:date>2013-11-12T07:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: linear combinations in mixed models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139395#M7305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LSMESTIMATES are additve, so for your example, in GLIMMIX, I would have something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=heatwave;&lt;/P&gt;&lt;P&gt;class id month;&lt;/P&gt;&lt;P&gt;model icecream=month;&lt;/P&gt;&lt;P&gt;random month/residual type=ar(1) subject=id;&lt;/P&gt;&lt;P&gt;random int / subject=id;&lt;/P&gt;&lt;P&gt;lsmestimate month 'Month 2 minus Month 1' -1 1 0 0 0 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Month 3 minus Month 2' 0 -1 1 0 0 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Difference' 1 -2 1 0 0 0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, I just subtracted the first line from the second.&amp;nbsp; This could be extended as needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 14:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139395#M7305</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-11-12T14:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: linear combinations in mixed models</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139396#M7306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha! I knew it had to be something simple. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 02:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/linear-combinations-in-mixed-models/m-p/139396#M7306</guid>
      <dc:creator>ehowie</dc:creator>
      <dc:date>2013-11-14T02:30:42Z</dc:date>
    </item>
  </channel>
</rss>

