<?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: Proc correlation  matrix with p and r plots in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811674#M22822</link>
    <description>&lt;P&gt;The closest that I know in SAS is the PLOTS=MATRIX option of PROC CORR. This produces the correlation value and the p-value in a table, rather than putting those values somewhere in the matrix plot, as in your graphic.&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="PaigeMiller_0-1651761030020.png"&gt;&lt;img src="https://communities.sas.com/skins/images/70F8802BAA6255D55FBEC62A8226FB10/responsive_peak/images/image_not_found.png" alt="PaigeMiller_0-1651761030020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 14:31:33 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-05-05T14:31:33Z</dc:date>
    <item>
      <title>Proc correlation  matrix with p and r plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811666#M22821</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create correlation plots with similar format with p and r inside.&amp;nbsp;&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="mona4u_1-1651757433229.png" style="width: 549px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71157i5D06D6C0D2C99AA9/image-dimensions/549x416?v=v2" width="549" height="416" role="button" title="mona4u_1-1651757433229.png" alt="mona4u_1-1651757433229.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 13:45:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811666#M22821</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2022-05-05T13:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc correlation  matrix with p and r plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811674#M22822</link>
      <description>&lt;P&gt;The closest that I know in SAS is the PLOTS=MATRIX option of PROC CORR. This produces the correlation value and the p-value in a table, rather than putting those values somewhere in the matrix plot, as in your graphic.&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="PaigeMiller_0-1651761030020.png"&gt;&lt;img src="https://communities.sas.com/skins/images/70F8802BAA6255D55FBEC62A8226FB10/responsive_peak/images/image_not_found.png" alt="PaigeMiller_0-1651761030020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 14:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811674#M22822</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-05T14:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc correlation  matrix with p and r plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811863#M22823</link>
      <description>&lt;P&gt;I like this graph. Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp; could give you a hand .or Post it at Graph forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/bd-p/sas_graph" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/bd-p/sas_graph&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 12:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811863#M22823</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-05-06T12:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc correlation  matrix with p and r plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811956#M22825</link>
      <description>&lt;P&gt;It is really uneasy.&lt;/P&gt;
&lt;P&gt;Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
 array x{*} age weight height;
do i=1 to dim(x);
 do j=1 to dim(x);
   id1=vname(x{i});
   id2=vname(x{j});
   a=x{i};
   b=x{j};
   if i=j then call missing(a,b);
   corr_p='                                ';
   if i=1 and j=2 or i=2 and j=1 then corr_p='r=0.16       p=0.06';
   if i=1 and j=3 or i=3 and j=1 then corr_p='r=0.56       p=0.46';
   if i=2 and j=3 or i=3 and j=2 then corr_p='r=0.02       p=0.01';
   output;
 end;
end;
keep id1 id2 a b corr_p;
run;

proc sgpanel data=class;
panelby id1 id2/layout=lattice PROPORTIONAL   NOWALL ONEPANEL SPACING=0
COLHEADERPOS=bottom ROWHEADERPOS=left NOVARNAME NOHEADERBORDER HEADERBACKCOLOR=white ;
scatter x=a y=b;
inset corr_p/position=bottom nolabel TEXTATTRS=(size=10) ;
rowaxis display=(nolabel);
colaxis display=(nolabel);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel11.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71200i6F6463F1C11410C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel11.png" alt="SGPanel11.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 11:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-correlation-matrix-with-p-and-r-plots/m-p/811956#M22825</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-05-07T11:10:46Z</dc:date>
    </item>
  </channel>
</rss>

