<?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 Fitplot with Multiple Regression? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146204#M5531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand fitplot is not an option with Proc Reg when you have a multi-variable model.&amp;nbsp; But what do I do if I want to plot the fitted values vs the actual values?&amp;nbsp; Is there any work around that provides a similar look/feel?&amp;nbsp; I used the output function to create a new dataset with the predicted values and tried plotting those (see code below), but when I tried to plot the fitted (yhat) values as a series the line was erratic (see attached).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;/P&gt;&lt;P&gt;proc sgplot data = fitted_model;&lt;/P&gt;&lt;P&gt;scatter X =x1 Y=Y /markerattrs =(color = blue);&lt;/P&gt;&lt;P&gt;series X =x1 Y=yhat /lineattrs =(color = red);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;IMG alt="Screen Shot 2014-01-18 at 10.30.13 PM.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4764_Screen Shot 2014-01-18 at 10.30.13 PM.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jan 2014 03:32:16 GMT</pubDate>
    <dc:creator>BenPorter</dc:creator>
    <dc:date>2014-01-19T03:32:16Z</dc:date>
    <item>
      <title>Fitplot with Multiple Regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146204#M5531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand fitplot is not an option with Proc Reg when you have a multi-variable model.&amp;nbsp; But what do I do if I want to plot the fitted values vs the actual values?&amp;nbsp; Is there any work around that provides a similar look/feel?&amp;nbsp; I used the output function to create a new dataset with the predicted values and tried plotting those (see code below), but when I tried to plot the fitted (yhat) values as a series the line was erratic (see attached).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;/P&gt;&lt;P&gt;proc sgplot data = fitted_model;&lt;/P&gt;&lt;P&gt;scatter X =x1 Y=Y /markerattrs =(color = blue);&lt;/P&gt;&lt;P&gt;series X =x1 Y=yhat /lineattrs =(color = red);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;IMG alt="Screen Shot 2014-01-18 at 10.30.13 PM.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4764_Screen Shot 2014-01-18 at 10.30.13 PM.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 03:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146204#M5531</guid>
      <dc:creator>BenPorter</dc:creator>
      <dc:date>2014-01-19T03:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fitplot with Multiple Regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146205#M5532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want actual by fitted (which is not a FITPLOT but a &lt;STRONG&gt;OBSERVEDBYPREDICTED plot&lt;/STRONG&gt;), seems like you should be plotting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scatter X =Yhat Y=Y / markerattrs =(color = blue);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and no series.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 04:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146205#M5532</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-01-19T04:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fitplot with Multiple Regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146206#M5533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to show the linear relationship between x1 and Y then you should sort your data BEFORE doing the regression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=myData; by my01variable x1; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc reg data=myData ...;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods graphics on;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sgplot data = fitted_model;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scatter X =x1 Y=Y / markerattrs =(color = blue);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;series X =x1 Y=yhat / group=my01variable lineattrs =(color = red);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &lt;STRONG&gt;my01variable&lt;/STRONG&gt; is the dummy variable that generates the two lines in the x1-Y relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 04:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146206#M5533</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-01-19T04:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fitplot with Multiple Regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146207#M5534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANK YOU!!!&amp;nbsp; Didn't realize I had to sort it...was driving me NUTS!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 19:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fitplot-with-Multiple-Regression/m-p/146207#M5534</guid>
      <dc:creator>BenPorter</dc:creator>
      <dc:date>2014-01-19T19:58:18Z</dc:date>
    </item>
  </channel>
</rss>

