<?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 How to add a block variable in ANCOVA model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-add-a-block-variable-in-ANCOVA-model/m-p/250825#M13226</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 blocking factor&amp;nbsp;(categorical).&amp;nbsp;As I&amp;nbsp;use a block design, I wonder what is a proper way to set up an ANCOVA model. I use SAS EG to do the analyses but I've told that &amp;nbsp;mayneed to modified the code myself to include a blocking factor. Do I just add one more factor in the classification variable option 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)&lt;BR /&gt;/&lt;BR /&gt;SS3&lt;BR /&gt;SOLUTION&lt;BR /&gt;SINGULAR=1E-07&lt;BR /&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;&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>Thu, 18 Feb 2016 14:44:40 GMT</pubDate>
    <dc:creator>kchanp01</dc:creator>
    <dc:date>2016-02-18T14:44:40Z</dc:date>
    <item>
      <title>How to add a block variable in ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-add-a-block-variable-in-ANCOVA-model/m-p/250825#M13226</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 blocking factor&amp;nbsp;(categorical).&amp;nbsp;As I&amp;nbsp;use a block design, I wonder what is a proper way to set up an ANCOVA model. I use SAS EG to do the analyses but I've told that &amp;nbsp;mayneed to modified the code myself to include a blocking factor. Do I just add one more factor in the classification variable option 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)&lt;BR /&gt;/&lt;BR /&gt;SS3&lt;BR /&gt;SOLUTION&lt;BR /&gt;SINGULAR=1E-07&lt;BR /&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;&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>Thu, 18 Feb 2016 14:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-add-a-block-variable-in-ANCOVA-model/m-p/250825#M13226</guid>
      <dc:creator>kchanp01</dc:creator>
      <dc:date>2016-02-18T14:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a block variable in ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-add-a-block-variable-in-ANCOVA-model/m-p/259638#M13710</link>
      <description>&lt;P&gt;You may have received an answer already, but this is a classic case where a mixed model approach is superior to PROC GLM. &amp;nbsp;See Littell et al.'s&amp;nbsp;&lt;EM&gt;SAS for Mixed Models, 2nd ed.&lt;/EM&gt; for examples. &amp;nbsp;In your case, I would suggest&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA=work1;
CLASS Treatment Site Block;
MODEL Tb_BVTV= Treatment Site Treatment*Site  Covariate(1) Covariate (2)
/

SOLUTION;
RANDOM Block;
LSMEANS Treatment Site Treatment*Site / DIFF=ALL ADJUST=TUKEY ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 12:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-add-a-block-variable-in-ANCOVA-model/m-p/259638#M13710</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-03-29T12:42:26Z</dc:date>
    </item>
  </channel>
</rss>

