<?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: Obtaining Residuals in a Mixed Model and Using them as an Outcome in another analysis in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-Residuals-in-a-Mixed-Model-and-Using-them-as-an/m-p/964156#M48349</link>
    <description>&lt;P&gt;To add residuals to an output statement use one or both of the OutPM=&amp;lt;some data set name&amp;gt; or Outp=&amp;lt;some other dataset name&amp;gt; along with the RESIDUAL option to the MODEL statment. OutPM gives the marginal residuals and OutP gives the conditional residuals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc mixed data=trial4;
class idno time; 
model CASI= time WMFA WMH ICV TOTAL_GM_VOL TOTAL_WM_VOL AGE RACE GENDER/s chisq  OUTPM=WORK.PM RESIDUAL;
repeated time/type=un subject=idno r rcorr;
run;&lt;/PRE&gt;
&lt;P&gt;Read the DETAILS section of the Online help for Proc MIXED under "Residuals and Influence Statistics" for details.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Apr 2025 04:44:34 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2025-04-12T04:44:34Z</dc:date>
    <item>
      <title>Obtaining Residuals in a Mixed Model and Using them as an Outcome in another analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-Residuals-in-a-Mixed-Model-and-Using-them-as-an/m-p/964140#M48348</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to obtain the residuals and then use them as the outcome in a separate model. In the past, I was able to extract the residuals using proc reg, as shown below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=abstract.pedometer_speedquint2;&lt;BR /&gt;model stepsperday=stepmin_avg_valid ;&lt;BR /&gt;OUTPUT out=b r=res;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=abstract.pedometer_speedquint2;&lt;BR /&gt;var r; /*residuals per participant*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have not been able to figure out how to do the same using proc mixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I am using for the analysis from which I want to extract the residuals:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc mixed data=trial4;&lt;BR /&gt;class idno time;&amp;nbsp;&lt;BR /&gt;model CASI= time WMFA WMH ICV TOTAL_GM_VOL TOTAL_WM_VOL AGE RACE GENDER/s chisq;&lt;BR /&gt;repeated time/type=un subject=idno r rcorr;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 22:51:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-Residuals-in-a-Mixed-Model-and-Using-them-as-an/m-p/964140#M48348</guid>
      <dc:creator>lgutm18</dc:creator>
      <dc:date>2025-04-11T22:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Residuals in a Mixed Model and Using them as an Outcome in another analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-Residuals-in-a-Mixed-Model-and-Using-them-as-an/m-p/964156#M48349</link>
      <description>&lt;P&gt;To add residuals to an output statement use one or both of the OutPM=&amp;lt;some data set name&amp;gt; or Outp=&amp;lt;some other dataset name&amp;gt; along with the RESIDUAL option to the MODEL statment. OutPM gives the marginal residuals and OutP gives the conditional residuals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc mixed data=trial4;
class idno time; 
model CASI= time WMFA WMH ICV TOTAL_GM_VOL TOTAL_WM_VOL AGE RACE GENDER/s chisq  OUTPM=WORK.PM RESIDUAL;
repeated time/type=un subject=idno r rcorr;
run;&lt;/PRE&gt;
&lt;P&gt;Read the DETAILS section of the Online help for Proc MIXED under "Residuals and Influence Statistics" for details.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Apr 2025 04:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-Residuals-in-a-Mixed-Model-and-Using-them-as-an/m-p/964156#M48349</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-04-12T04:44:34Z</dc:date>
    </item>
  </channel>
</rss>

