<?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: Scatter plot showing correlation with best fit line in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858536#M42435</link>
    <description>&lt;P&gt;Plot:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
reg x=height y=weight ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Values - need to get from PROC CORR and add in using INSET&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 17:01:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2023-02-13T17:01:09Z</dc:date>
    <item>
      <title>Scatter plot showing correlation with best fit line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858500#M42426</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to create a scatter plot showing correlation with a best fit line. When I use ellipse=0.2 0.3 in PROC CORR I find a scatter plot with circle best line. I want a straight best line like the picture I attached.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to create a scatter plot which shows r and P-value for correlation with a best fit line. Can you help me? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 13:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858500#M42426</guid>
      <dc:creator>Manije72</dc:creator>
      <dc:date>2023-02-13T13:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot showing correlation with best fit line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858505#M42430</link>
      <description>&lt;P&gt;Some of us (like me) never download attachments. Please show us the plot of interest by clicking on the "Insert Photos" icon and not via attaching a file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, take a look at the ELLIPSE statement and the example &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatproc/p13h3e27hyicb4n1glpg719kjq45.htm" target="_self"&gt;here&lt;/A&gt;, if this is what you want, except no line, we can do this and add the line.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 13:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858505#M42430</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-13T13:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot showing correlation with best fit line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858515#M42433</link>
      <description>&lt;P&gt;Create output data from Proc Corr.&lt;/P&gt;
&lt;P&gt;Use a data step to use that information to create a series of points for the line&lt;/P&gt;
&lt;P&gt;Combine that data with the raw data&lt;/P&gt;
&lt;P&gt;Use SGPLOT and overlay a Scatter plot of the raw data with a Series plot of the line points created.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 16:01:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858515#M42433</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-13T16:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot showing correlation with best fit line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858536#M42435</link>
      <description>&lt;P&gt;Plot:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
reg x=height y=weight ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Values - need to get from PROC CORR and add in using INSET&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 17:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858536#M42435</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-02-13T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot showing correlation with best fit line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858537#M42436</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods select none;
ods output parameterEstimates=pEst fitStatistics=fStats;
proc reg data=sashelp.class;
  model weight = height;
  output out=graphingData p=predicted;
run;

data _null_;
set fStats (obs=1);
call symputx('corr', put(sqrt(nValue2), 12.4));
run;

data _null_;
set pEst(obs=2);
call symputx('pvalue', put(probT, pvalue.));
run;
ods select all;
	
proc sgplot data=sashelp.class;
  reg x=height y=weight ;
  inset ("Correlation = " = "&amp;amp;corr."
          "P-Value =" = "&amp;amp;pvalue.");
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Feb 2023 17:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scatter-plot-showing-correlation-with-best-fit-line/m-p/858537#M42436</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-02-13T17:28:53Z</dc:date>
    </item>
  </channel>
</rss>

