<?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 Proc Reg and Proc score in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493301#M31795</link>
    <description>&lt;P&gt;I have created a linear regression model using Proc Reg output my parameters to use in Proc Score and produced the predicted values in my output table. However when I used Proc Score on data (including the data used to build the model) the values for the data I used to build the model are different in Proc Score to the output predicted values in Proc Reg. Can anyone explain this?&lt;/P&gt;&lt;P&gt;(EG 7.1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;TD&gt;P_Reg&lt;/TD&gt;&lt;TD&gt;P_Score&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;88806&lt;/TD&gt;&lt;TD&gt;89207.13&lt;/TD&gt;&lt;TD&gt;89300.56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;89051&lt;/TD&gt;&lt;TD&gt;89286.64&lt;/TD&gt;&lt;TD&gt;89421.16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;89397&lt;/TD&gt;&lt;TD&gt;89364.52&lt;/TD&gt;&lt;TD&gt;89541.75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;90354&lt;/TD&gt;&lt;TD&gt;90080.69&lt;/TD&gt;&lt;TD&gt;90134.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;90984&lt;/TD&gt;&lt;TD&gt;90552.01&lt;/TD&gt;&lt;TD&gt;90541.30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;91283&lt;/TD&gt;&lt;TD&gt;90979.03&lt;/TD&gt;&lt;TD&gt;90948.60&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Sep 2018 08:07:27 GMT</pubDate>
    <dc:creator>SandyWindsor</dc:creator>
    <dc:date>2018-09-07T08:07:27Z</dc:date>
    <item>
      <title>Proc Reg and Proc score</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493301#M31795</link>
      <description>&lt;P&gt;I have created a linear regression model using Proc Reg output my parameters to use in Proc Score and produced the predicted values in my output table. However when I used Proc Score on data (including the data used to build the model) the values for the data I used to build the model are different in Proc Score to the output predicted values in Proc Reg. Can anyone explain this?&lt;/P&gt;&lt;P&gt;(EG 7.1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;TD&gt;P_Reg&lt;/TD&gt;&lt;TD&gt;P_Score&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;88806&lt;/TD&gt;&lt;TD&gt;89207.13&lt;/TD&gt;&lt;TD&gt;89300.56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;89051&lt;/TD&gt;&lt;TD&gt;89286.64&lt;/TD&gt;&lt;TD&gt;89421.16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;89397&lt;/TD&gt;&lt;TD&gt;89364.52&lt;/TD&gt;&lt;TD&gt;89541.75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;90354&lt;/TD&gt;&lt;TD&gt;90080.69&lt;/TD&gt;&lt;TD&gt;90134.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;90984&lt;/TD&gt;&lt;TD&gt;90552.01&lt;/TD&gt;&lt;TD&gt;90541.30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;91283&lt;/TD&gt;&lt;TD&gt;90979.03&lt;/TD&gt;&lt;TD&gt;90948.60&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 08:07:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493301#M31795</guid>
      <dc:creator>SandyWindsor</dc:creator>
      <dc:date>2018-09-07T08:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Reg and Proc score</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493346#M31805</link>
      <description>&lt;P&gt;You'd need to show us your code, and show us a reasonable portion of your data (as a SAS data step, see: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 10:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493346#M31805</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-09-07T10:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Reg and Proc score</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493491#M31815</link>
      <description>&lt;P&gt;They should be the same, so my assumption at this point would be user error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of how it should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Fitness;
   input Age Weight Oxygen RunTime RestPulse RunPulse @@;
   datalines;
44 89.47  44.609 11.37 62 178     40 75.07  45.313 10.07 62 185
44 85.84  54.297  8.65 45 156     42 68.15  59.571  8.17 40 166
38 89.02  49.874  9.22 55 178     47 77.45  44.811 11.63 58 176
40 75.98  45.681 11.95 70 176     43 81.19  49.091 10.85 64 162
44 81.42  39.442 13.08 63 174     38 81.87  60.055  8.63 48 170
44 73.03  50.541 10.13 45 168     45 87.66  37.388 14.03 56 186
;

proc reg data=Fitness outest=RegOut;
   OxyHat: model Oxygen=Age Weight RunTime RunPulse RestPulse;
   output out=p1 p= r=;
   title 'Regression Scoring Example';
run;quit;

proc print data=RegOut;
   title2 'OUTEST= Data Set from PROC REG';
run;

proc score data=Fitness score=RegOut out=P2 type=parms;
   var Age Weight RunTime RunPulse RestPulse;

run;

proc print data=P2;
   title2 'Predicted Scores for Regression';
run;


data check;
merge p1 (keep=oxygen) P2(keep = oxygen rename=oxygen=O2) ;

diff= round(oxygen-o2, 0.0001);
run;

title 'Check of differences, should be 0';
proc print data=check;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/72605"&gt;@SandyWindsor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have created a linear regression model using Proc Reg output my parameters to use in Proc Score and produced the predicted values in my output table. However when I used Proc Score on data (including the data used to build the model) the values for the data I used to build the model are different in Proc Score to the output predicted values in Proc Reg. Can anyone explain this?&lt;/P&gt;
&lt;P&gt;(EG 7.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Target&lt;/TD&gt;
&lt;TD&gt;P_Reg&lt;/TD&gt;
&lt;TD&gt;P_Score&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;88806&lt;/TD&gt;
&lt;TD&gt;89207.13&lt;/TD&gt;
&lt;TD&gt;89300.56&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;89051&lt;/TD&gt;
&lt;TD&gt;89286.64&lt;/TD&gt;
&lt;TD&gt;89421.16&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;89397&lt;/TD&gt;
&lt;TD&gt;89364.52&lt;/TD&gt;
&lt;TD&gt;89541.75&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;90354&lt;/TD&gt;
&lt;TD&gt;90080.69&lt;/TD&gt;
&lt;TD&gt;90134.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;90984&lt;/TD&gt;
&lt;TD&gt;90552.01&lt;/TD&gt;
&lt;TD&gt;90541.30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;91283&lt;/TD&gt;
&lt;TD&gt;90979.03&lt;/TD&gt;
&lt;TD&gt;90948.60&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/493491#M31815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-07T15:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Reg and Proc score</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/494056#M31834</link>
      <description>&lt;P&gt;Thanks upon checking the file which was imported from excel had become corrupted ,so some of the values were incorrect.&lt;/P&gt;&lt;P&gt;Item is now resolved&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 09:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Reg-and-Proc-score/m-p/494056#M31834</guid>
      <dc:creator>SandyWindsor</dc:creator>
      <dc:date>2018-09-10T09:14:50Z</dc:date>
    </item>
  </channel>
</rss>

