<?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 for ANCOVA Model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909741#M45155</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I moved this topic thread to "Statistical Procedures"-board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this is the code you need:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'all pairwise comparisons';
*ods select lsmeans diffs;
proc mixed data=inds covtest ; 
  class patientid trt ;    
  model AVISIT /*(Week 48 value)*/ =  trt base / ddfm=kr2 s;
  random patientid; 
  lsmeans trt / diff cl alpha=0.20;
  ods output Diffs=trt_diffs;
  ods output LSMeans=trt_lsmeans;
run;
title; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 09:52:51 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2023-12-27T09:52:51Z</dc:date>
    <item>
      <title>Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909730#M45153</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am new to Proc Mixed to use it for ANOVAL model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per below, i have to use Proc Mixed for ANCOVA model.&lt;/P&gt;&lt;P&gt;"The Change From Baseline in LSM compared between study treatments at week 48 using ANCOVA with study treatments as the main effect in the model and baseline score as a covariate."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my dataset variables are : TRT(Treatments distinct values are 1,2,3) , AVAL(Value),AVISIT(Week 48 value) , CHG (Change ) , BASE(Baseline)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below statement , but not sure is correct one as per above statement , and how to use Main model and covariate&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mixed data=inds covtest ; 
  class trt ;    
  model chg =  trt base;  
  lsmeans trt  cl alpha=0.20; 
  ods output Diffs=fib_dif;
  ods output LSMeans=fib_means;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;please let me is above statement is correct , if not&amp;nbsp; let me now how to adjust the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Raja.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 06:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909730#M45153</guid>
      <dc:creator>raja777pharma</dc:creator>
      <dc:date>2023-12-27T06:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909731#M45154</link>
      <description>&lt;P&gt;Form your code, You are building a FIXED model ,not MIXED model.&lt;/P&gt;
&lt;P&gt;If you need MIXED model, you need include RANDOM effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=inds covtest ; 
  class subjectid  trt avisit;    
  model chg =  trt base avisit /s ;  
 random int/subject=subjectid s ;
 repeated avisit/subject=subjectid type=ar(1);
  lsmeans trt  /cl alpha=0.1; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp; could give you right code.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 07:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909731#M45154</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-27T07:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909741#M45155</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I moved this topic thread to "Statistical Procedures"-board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this is the code you need:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'all pairwise comparisons';
*ods select lsmeans diffs;
proc mixed data=inds covtest ; 
  class patientid trt ;    
  model AVISIT /*(Week 48 value)*/ =  trt base / ddfm=kr2 s;
  random patientid; 
  lsmeans trt / diff cl alpha=0.20;
  ods output Diffs=trt_diffs;
  ods output LSMeans=trt_lsmeans;
run;
title; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 09:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909741#M45155</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-12-27T09:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909742#M45156</link>
      <description>&lt;P&gt;Or a random coefficient model:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'all pairwise comparisons';
*ods select lsmeans diffs;
proc mixed data=inds covtest ; 
  class patientid trt ;    
  model AVISIT /*(Week 48 value)*/ =  trt base / ddfm=kr2 s;
 *random patientid; 
  random int  / type=un subject=patientid;
  lsmeans trt / diff cl alpha=0.20;
  ods output Diffs=trt_diffs;
  ods output LSMeans=trt_lsmeans;
run;
title; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Understanding the Subject= Effect in SAS Mixed Models Software&lt;BR /&gt;SAS Software YouTube channel&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pX88W9xViJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pX88W9xViJ8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Global Forum 2012 -- Paper 332-2012&lt;BR /&gt;Tips and Strategies for Mixed Modeling with SAS/STAT® Procedures&lt;BR /&gt;Kathleen Kiernan, Jill Tao, and Phil Gibbs, SAS Institute Inc., Cary, NC, USA&lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings12/332-2012.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings12/332-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 09:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909742#M45156</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-12-27T09:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909851#M45164</link>
      <description>&lt;P&gt;I have a different issue - doing an ANCOVA with the baseline as a covariate runs into an issue if the response is the change from baseline. This is a situation where regression to the mean is one issue, and the algebraic relationship between the baseline and the change from baseline is often a major problem. I think you should consider one of the following approaches: analyze the change score as an ANOVA, analyze the individual scores as a repeated measures ANOVA or analyze the "post" measurement using the "pre" measure as a covariate in an ANCOVA.&amp;nbsp; Any one of these approaches can be implemented in PROC MIXED, and any one of them will give a less biased result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a quick tutorial on analysis of change scores, see this link from the Vanderbilt University Medical Center:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://biostat.app.vumc.org/wiki/Main/MeasureChange2" target="_self"&gt;https://biostat.app.vumc.org/wiki/Main/MeasureChange2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 15:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909851#M45164</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-28T15:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909853#M45166</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... or analyze the "post" measurement using the "pre" measure as a covariate in an ANCOVA.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's the approach I took in both programs I posted yesterday in this topic thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 16:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909853#M45166</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-12-28T16:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed for ANCOVA Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909901#M45170</link>
      <description>&lt;P&gt;Indeed it is, Koen. I mistakenly believed that the variable AVISIT was still the deviation from baseline.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 15:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-for-ANCOVA-Model/m-p/909901#M45170</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-29T15:01:44Z</dc:date>
    </item>
  </channel>
</rss>

