<?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: How to include a block factor in ANOVA/ANCOVA model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/251844#M13281</link>
    <description>&lt;P&gt;You really need to switch to MIXED or GLIMMIX for this. See SAS for Mixed Models, 2nd edition (2006). The syntax is a bit different compared with GLM. In particular, you do NOT put random effects in a model statement; random effects are given only in one or more random statements. Based on your description, I think blocks are nested within sites. Thus, there would be no block main effect, but there would be a block(site) effect. The procedure automatically figures everything out that you are concerned about.&lt;/P&gt;
&lt;P&gt;PROC MIXED DATA=work1;&lt;BR /&gt;CLASS Treatment&amp;nbsp;Site Block;&lt;BR /&gt;MODEL Tb_BVTV= Treatment Site Treatment*Site Covariate(1) Covariate (2)&amp;nbsp;/&amp;nbsp;SS3;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;random block(site);&lt;/STRONG&gt;&lt;BR /&gt;LSMEANS &lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt; Site &lt;/SPAN&gt;&lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt;*Site&lt;/SPAN&gt; / PDIFF=ALL ADJUST=TUKEY ;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2016 20:08:53 GMT</pubDate>
    <dc:creator>lvm</dc:creator>
    <dc:date>2016-02-23T20:08:53Z</dc:date>
    <item>
      <title>How to include a block factor in ANOVA/ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/251650#M13275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am analyzing data from a randomized block design study. We have two independent variables (Treatment and Site), two covariate and one block factor&amp;nbsp;(categorical). I wonder what is a proper way to set up an ANCOVA model with&amp;nbsp;the block factor. I use SAS EG to do the analyses but I've told that &amp;nbsp;I may need to modify the code myself to include a block factor. Do I just add one more factor as a&amp;nbsp;classification (independent) variable in Linear Model? How can I make sure that SAS would treat the block variable separately from the two independent variables I have? Below is my code from SAS EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GLM DATA=work1;&lt;BR /&gt;CLASS Treatment&amp;nbsp;Site Block;&lt;BR /&gt;MODEL Tb_BVTV= Treatment Site Treatment*Site&amp;nbsp;Block&amp;nbsp;Covariate(1) Covariate (2)&amp;nbsp;/&amp;nbsp;SS3;&lt;BR /&gt;LSMEANS &lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt; Site &lt;/SPAN&gt;&lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt;*Site&lt;/SPAN&gt; / PDIFF=ALL ADJUST=TUKEY ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 22:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/251650#M13275</guid>
      <dc:creator>kchanp01</dc:creator>
      <dc:date>2016-02-22T22:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to include a block factor in ANOVA/ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/251844#M13281</link>
      <description>&lt;P&gt;You really need to switch to MIXED or GLIMMIX for this. See SAS for Mixed Models, 2nd edition (2006). The syntax is a bit different compared with GLM. In particular, you do NOT put random effects in a model statement; random effects are given only in one or more random statements. Based on your description, I think blocks are nested within sites. Thus, there would be no block main effect, but there would be a block(site) effect. The procedure automatically figures everything out that you are concerned about.&lt;/P&gt;
&lt;P&gt;PROC MIXED DATA=work1;&lt;BR /&gt;CLASS Treatment&amp;nbsp;Site Block;&lt;BR /&gt;MODEL Tb_BVTV= Treatment Site Treatment*Site Covariate(1) Covariate (2)&amp;nbsp;/&amp;nbsp;SS3;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;random block(site);&lt;/STRONG&gt;&lt;BR /&gt;LSMEANS &lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt; Site &lt;/SPAN&gt;&lt;SPAN&gt;Treatment&lt;/SPAN&gt;&lt;SPAN&gt;*Site&lt;/SPAN&gt; / PDIFF=ALL ADJUST=TUKEY ;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 20:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/251844#M13281</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2016-02-23T20:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to include a block factor in ANOVA/ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/252147#M13312</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if the GLM would still work if I have a control on the blocks I used?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-a-block-factor-in-ANOVA-ANCOVA-model/m-p/252147#M13312</guid>
      <dc:creator>kchanp01</dc:creator>
      <dc:date>2016-02-24T18:54:53Z</dc:date>
    </item>
  </channel>
</rss>

