<?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: constrain the sum of covariances in MIXED in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118223#M293216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Steve, I knew the job was dangerous when I took it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Charlie Baer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Aug 2013 12:28:21 GMT</pubDate>
    <dc:creator>cbaer</dc:creator>
    <dc:date>2013-08-22T12:28:21Z</dc:date>
    <item>
      <title>constrain the sum of covariances in MIXED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118221#M293214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a biologist with little training in linear algebra.&amp;nbsp; So: I want to calculate a covariance matrix in MIXED then constrain the DIFFERENCE between two matrices to be equal to the difference of two other matrices, and use a LRT to compare the constrained model to the unconstrained model.&amp;nbsp; Here's the setup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two &lt;EM&gt;Populations&lt;/EM&gt; (N and P), each of which is present in two &lt;EM&gt;Treatments&lt;/EM&gt; (C and M).&amp;nbsp; Each &lt;EM&gt;Population&lt;/EM&gt; contains 15 Lines in the C treatment and 45 Lines in the M treatment; C Lines are independent from M Lines.&amp;nbsp; Each Line consists of ~ 25 Replicates.&amp;nbsp; Each Replicate was measured for a set of four (continuous) Traits, normalized to the Trait mean.&amp;nbsp; Population and Treatment are fixed effects, Line and Replicate are random effects.&amp;nbsp;&amp;nbsp; The quantity of interest is the DIFFERENCE IN THE DIFFERENCE in the among-Line (co)variances between the two treatment groups in the two Populations.&amp;nbsp;&amp;nbsp; Representing the among-Line covariance matrix as &lt;STRONG&gt;L&lt;/STRONG&gt;, the question is: Does &lt;STRONG&gt;L&lt;/STRONG&gt;(M)-&lt;STRONG&gt;L&lt;/STRONG&gt;(C) differ between the two Populations?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate the covariance matrix(s), I use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC MIXED data=&amp;lt;datasetname&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLASS Trait Treatment Population LIne Replicate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODEL Value=Trait;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANDOM Trait/SUBJECT=Line GROUP=Population*Treatment TYPE=un;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPEATED Trait/SUBJECT=Rep(Line Population Treatment) TYPE=un;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS OUTPUT covparms=cov_parms;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code generates unstructured among-Line covariance matrices for each Population*Treatment combination and an overall likelihood.&amp;nbsp; The next step is to constrain L(M)-L(C) for Population N equal to L(M)-L(C) for population P and compare the likelihood to the first model.&amp;nbsp; Which is where I'm stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 19:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118221#M293214</guid>
      <dc:creator>cbaer</dc:creator>
      <dc:date>2013-08-21T19:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: constrain the sum of covariances in MIXED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118222#M293215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never tried TYPE=LIN(q), but it looks like it might be a way to construct a linear combination of known matrices.&amp;nbsp; The constraint that you want could be (might be, not sure how) coded in a datastep.&amp;nbsp; This looks difficult from an outside perspective, though.&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>Thu, 22 Aug 2013 11:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118222#M293215</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-08-22T11:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: constrain the sum of covariances in MIXED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118223#M293216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Steve, I knew the job was dangerous when I took it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Charlie Baer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 12:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/constrain-the-sum-of-covariances-in-MIXED/m-p/118223#M293216</guid>
      <dc:creator>cbaer</dc:creator>
      <dc:date>2013-08-22T12:28:21Z</dc:date>
    </item>
  </channel>
</rss>

