<?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: How do I get simple pearson correlations for 5 pairs and 8 groups in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/351086#M18400</link>
    <description>&lt;P&gt;Thanks for asking, but the data is protected and would be difficult to mask so it could be posted.&amp;nbsp; I was able to use the links to the articles to find statements I could use to get the results I needed.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 00:03:57 GMT</pubDate>
    <dc:creator>plzsiga</dc:creator>
    <dc:date>2017-04-19T00:03:57Z</dc:date>
    <item>
      <title>How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349635#M18321</link>
      <description>&lt;P&gt;I am looking for a simple way to produce correlations for 5 pairs of variable across 8 groups.&amp;nbsp; I am using SAS 9.4 with &amp;nbsp;SAS/STAT 14.1 and can work on Enterprise Guide or Base SAS.&lt;/P&gt;&lt;P&gt;The code below is what I am using, thanks to others who have posted and appear in Lex Jansen's pages.&lt;/P&gt;&lt;P&gt;But my code produces 135 separate tabs when ods puts it in an excel file.&lt;/P&gt;&lt;P&gt;I tried doing all 10 in one proc corr statement, and that produced a 10 x 10 chart for each of the 8 groups.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also don't need the 'Simple Statistics' table and am most interested in the correlation only.&lt;/P&gt;&lt;P&gt;Is there a way to get everything (all 5 pairs by 8 groups) into 1 table, or even 1 table for all 5 pairs for each of the 8 groups? I have to perform this with 9 databases, and am a lazy man, which is why I love SAS.&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 corr data = alltoclus;
var var1 var2;
by Grade;
run;

proc corr data = alltoclus;
var var3 var4;
by Grade;
run;

proc corr data = alltoclus;
var var5 var6;
by Grade;
run;

proc corr data = alltoclus;
var var7 var8;
by Grade;
run;

proc corr data = alltoclus;
var var9 var10 ;
by Grade;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 23:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349635#M18321</guid>
      <dc:creator>plzsiga</dc:creator>
      <dc:date>2017-04-12T23:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349639#M18322</link>
      <description>&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above SAS blogs cover capturing and controlling output from a SAS Procedure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Include all variables at once, store results in a dataset rather than use output and filter the dataset as desired.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 00:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349639#M18322</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-13T00:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349641#M18323</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; That makes it easier.&amp;nbsp; I was able to run each pair once, and sort the outputby type and group in excel to get a simple chart of each pair by group. The revised code is below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data = alltoclus outp=OutCorr1 NOPRINT;
var var1 var2;
by Grade;
run;

proc corr data = alltoclus outp=OutCorr2 NOPRINT;
var var3 var4;
by Grade;
run;

proc corr data = alltoclus outp=OutCorr3 NOPRINT;
var var5 var6;
by Grade;
run;
proc corr data = alltoclus outp=OutCorr4 NOPRINT;
var var7 var8;
by Grade;
run;

proc corr data = alltoclus outp=OutCorr5 NOPRINT;
var var9 var10 ;
by Grade;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 01:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349641#M18323</guid>
      <dc:creator>plzsiga</dc:creator>
      <dc:date>2017-04-13T01:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349733#M18329</link>
      <description>&lt;PRE&gt;
Do you like to use SAS/IML code ?

Post your sample data and the output .


&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 12:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/349733#M18329</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-13T12:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/351086#M18400</link>
      <description>&lt;P&gt;Thanks for asking, but the data is protected and would be difficult to mask so it could be posted.&amp;nbsp; I was able to use the links to the articles to find statements I could use to get the results I needed.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 00:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/351086#M18400</guid>
      <dc:creator>plzsiga</dc:creator>
      <dc:date>2017-04-19T00:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get simple pearson correlations for 5 pairs and 8 groups</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/351092#M18401</link>
      <description>&lt;P&gt;SAMPLE data, it needs to show the structure of your data but doesn't have to be real.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 00:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-get-simple-pearson-correlations-for-5-pairs-and-8/m-p/351092#M18401</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-19T00:46:40Z</dc:date>
    </item>
  </channel>
</rss>

