<?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 How to plot both scatterplot data and the fitted curve in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727565#M35281</link>
    <description>&lt;P&gt;My first post to SAS communities...&lt;/P&gt;&lt;P&gt;I want the fitted data (red dots) in the scatterplot below to be a line rather than a set of dots. I don't see a way an option within the scatter statement to change the circles to lines. Any suggestions?&amp;nbsp; (My code below.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=pred1;&lt;BR /&gt;scatter x=eucdist y= HTp; *blue circles;&lt;BR /&gt;scatter x=eucdist y= HTp_pred; *red circles;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Goyo_0-1616099699108.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56132i327592711552FFFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Goyo_0-1616099699108.png" alt="Goyo_0-1616099699108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 20:46:19 GMT</pubDate>
    <dc:creator>Goyo</dc:creator>
    <dc:date>2021-03-18T20:46:19Z</dc:date>
    <item>
      <title>How to plot both scatterplot data and the fitted curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727565#M35281</link>
      <description>&lt;P&gt;My first post to SAS communities...&lt;/P&gt;&lt;P&gt;I want the fitted data (red dots) in the scatterplot below to be a line rather than a set of dots. I don't see a way an option within the scatter statement to change the circles to lines. Any suggestions?&amp;nbsp; (My code below.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=pred1;&lt;BR /&gt;scatter x=eucdist y= HTp; *blue circles;&lt;BR /&gt;scatter x=eucdist y= HTp_pred; *red circles;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Goyo_0-1616099699108.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56132i327592711552FFFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Goyo_0-1616099699108.png" alt="Goyo_0-1616099699108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 20:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727565#M35281</guid>
      <dc:creator>Goyo</dc:creator>
      <dc:date>2021-03-18T20:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot both scatterplot data and the fitted curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727572#M35283</link>
      <description>&lt;P&gt;SCATTER creates a scatter plot. &lt;BR /&gt;Use SERIES to create a line plot instead. &lt;BR /&gt;Everything else can stay the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: REG can do both at once though, without the pre-calculation as well. Remove the CLM/CLI to remove the prediction and confidence intervals. You could do all three together to test that if you'd like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
  reg x=height y=weight / CLM CLI;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 21:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727572#M35283</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-18T21:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot both scatterplot data and the fitted curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727580#M35284</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;SCATTER creates a scatter plot. &lt;BR /&gt;Use SERIES to create a line plot instead. &lt;BR /&gt;Everything else can stay the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: REG can do both at once though, without the pre-calculation as well. Remove the CLM/CLI to remove the prediction and confidence intervals. You could do all three together to test that if you'd like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
  reg x=height y=weight / CLM CLI;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Data shows enough of a curve you may want the DEGREES=2 option to fit a quadratic in the Sgplot REG statement.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 21:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/727580#M35284</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-18T21:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot both scatterplot data and the fitted curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/728202#M35296</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=pred1; by eucdist; run;

proc sgplot data=pred1;
scatter x=eucdist y= HTp; *blue circles;
series x=eucdist y= HTp_pred / lineattrs=GraphData2; *line in contrasting color;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Mar 2021 14:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-plot-both-scatterplot-data-and-the-fitted-curve/m-p/728202#M35296</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-22T14:34:07Z</dc:date>
    </item>
  </channel>
</rss>

