<?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: Proc Mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/441951#M23257</link>
    <description>&lt;P&gt;Thank you so much sld. I appreciate your help.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Mar 2018 22:38:30 GMT</pubDate>
    <dc:creator>aboalzahra1423</dc:creator>
    <dc:date>2018-03-02T22:38:30Z</dc:date>
    <item>
      <title>Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/438812#M23136</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to run a repeated measure in proc mixed with double nest (site is nested in calf and calf is nested in tx) but I am not success to do it. Would you please to help revise my code below? with an example of&amp;nbsp;data of two calves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; dex1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; calf time site $ tx $ log10cfu;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;9 -1 Ear control 0&lt;/P&gt;&lt;P&gt;9 -1 Eye control 0&lt;/P&gt;&lt;P&gt;9 -1 Nose control 0&lt;/P&gt;&lt;P&gt;30 7 Ear Dex 0&lt;/P&gt;&lt;P&gt;30 7 Eye Dex 0&lt;/P&gt;&lt;P&gt;30 7 Nose Dex 3.574031268&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;mixed&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;method&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=reml &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;covtest&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=dex1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; calf time site tx;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; log10cfu= site time tx tx*time/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ddfm&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=satterth &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;solution&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; calf site site*calf site*time calf*time calf*tx calf*time*tx calf*time*tx*site;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; time*tx/ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;alpha&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.05&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; tdiff Pdiff;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;repeated&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; time /&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;sub&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= site (calf tx) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;type&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=arh(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;r&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rcorr&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hussain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/438812#M23136</guid>
      <dc:creator>aboalzahra1423</dc:creator>
      <dc:date>2018-02-21T22:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/441065#M23233</link>
      <description>&lt;P&gt;Consider (assuming that I understand your experimental design correctly):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed method=reml covtest data=dex1;
  class calf time site tx;
  model log10cfu= tx site tx*site time time*tx time*site time*tx*site / 
    ddfm=satterth solution;
  random calf(tx);
  *random site*calf(tx); /* this statement could be included with arh(1) or not; 
    for most other types, it is excluded because it is redundant to the 
    repeated statement */
  repeated time / subject=site*calf(tx) type=arh(1) r rcorr;
  lsmeans time*tx / alpha=0.05 cl tdiff Pdiff;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the MIXED procedure, fixed effects that are identified in the MODEL statement are not duplicated in the RANDOM statement, so you would not have &lt;EM&gt;site&lt;/EM&gt; or &lt;EM&gt;site*time&lt;/EM&gt; in RANDOM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;calf*time*tx*site&lt;/EM&gt; should be excluded from RANDOM because it identifies the residual variance; if you include it, your model is overspecified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my opinion, some of your terms in RANDOM are either wrong (like &lt;EM&gt;calf&lt;/EM&gt;, rather than &lt;EM&gt;calf(tx)&lt;/EM&gt; ) or partition variance unnecessarily (like &lt;EM&gt;calf*time&lt;/EM&gt; and&lt;EM&gt; calf*time*tx&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 23:07:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/441065#M23233</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-02-28T23:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/441951#M23257</link>
      <description>&lt;P&gt;Thank you so much sld. I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 22:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed/m-p/441951#M23257</guid>
      <dc:creator>aboalzahra1423</dc:creator>
      <dc:date>2018-03-02T22:38:30Z</dc:date>
    </item>
  </channel>
</rss>

