<?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 use proc mixed for ANCOVA model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687475#M33147</link>
    <description>Thank you very much. Could you please also guide about how to get the standard deviation of the residuals from the model.&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:46:13 GMT</pubDate>
    <dc:creator>Arthur2</dc:creator>
    <dc:date>2020-09-29T11:46:13Z</dc:date>
    <item>
      <title>How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687455#M33137</link>
      <description>&lt;P&gt;Hi, I'm using proc mix to fit ANCOVA model to get the following:&lt;BR /&gt;1) LS means of each treatment&lt;BR /&gt;2) SE of each treatment&lt;BR /&gt;3) LS means difference (placebo - each treatment) with placebo as treatn=3&lt;BR /&gt;4) SE difference (placebo - each treatment)&lt;BR /&gt;5) SD (standard deviation of residuals from the model)&lt;BR /&gt;6) Plot studentized residuals versus predicted values, and also check the distribution of (unstandardized) residuals using a plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is:&lt;BR /&gt;ods output lsmeans=estimate&lt;BR /&gt;diffs=diff;&lt;BR /&gt;proc mixed data = mydata (where=(treatn in (1,2,3)));&lt;BR /&gt;by treatn treat avisitn avisit;&lt;BR /&gt;class treatn;&lt;BR /&gt;model aval = treatn avisitn base;&lt;BR /&gt;lsmeans treatn / diff=control('3');&lt;BR /&gt;run;&lt;BR /&gt;ods output close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting error:&lt;BR /&gt;"WARNING: Output 'Diff' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify&lt;BR /&gt;that the appropriate procedure options are used to produce the requested output object. For example, verify that the&lt;BR /&gt;NOPRINT option is not used."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help is needed to resolve the error and guidance to use the proc mix appropriately to achieve above mentioned requirements for ANCOVA.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687455#M33137</guid>
      <dc:creator>Arthur2</dc:creator>
      <dc:date>2020-09-29T10:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687463#M33141</link>
      <description>&lt;P&gt;Your BY statement has treatn in it.&amp;nbsp; Consequently, MIXED is trying to fit separate models for each level of treatn.&amp;nbsp; As a result, there are no differences between treatn lsmeans - just a single lsmean value.&amp;nbsp; Thus, the error for diffs=diff.&amp;nbsp; The solution is to remove treatn from the BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687463#M33141</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-29T11:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687475#M33147</link>
      <description>Thank you very much. Could you please also guide about how to get the standard deviation of the residuals from the model.&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687475#M33147</guid>
      <dc:creator>Arthur2</dc:creator>
      <dc:date>2020-09-29T11:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687523#M33151</link>
      <description>&lt;P&gt;This will be a two-step process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First generate the dataset containing the residuals by adding two options to the MODEL statement (outp= and residual)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output lsmeans=estimate
diffs=diff;
proc mixed data = mydata (where=(treatn in (1,2,3)));
by treat avisit;
class treatn;
model aval = treatn avisitn base/outp=predicts residual;
lsmeans treatn / diff=control('3');
run;
ods output close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then, use PROC MEANS (or SUMMARY or UNIVARIATE or SQL) to calculate the SD for the residual variable.&amp;nbsp; Off the top of my head, I don't recall the variable name for the residuals, but it probably defaults to something like 'resid'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=predicts noprint;
var resid;
output out=resid_sd std(resid)=std_resid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you are looking for standard deviations by treatn, you can add a CLASS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687523#M33151</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-29T14:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687527#M33152</link>
      <description>&lt;P&gt;I'm thinking that since this isn't really a Mixed model, as there are no random terms, that PROC GLM ought to work, and it will provide the mean square for error (variance of the residuals) directly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687527#M33152</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-29T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687530#M33153</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, the sound you just heard was me slapping my own face.&amp;nbsp; This is an EXCELLENT observation. The RMSE from PROC GLM is the standard deviation of the residuals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687530#M33153</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-09-29T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for ANCOVA model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687532#M33154</link>
      <description>I got it, thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-proc-mixed-for-ANCOVA-model/m-p/687532#M33154</guid>
      <dc:creator>Arthur2</dc:creator>
      <dc:date>2020-09-29T14:40:13Z</dc:date>
    </item>
  </channel>
</rss>

