<?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 SQL SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316302#M270916</link>
    <description>&lt;P&gt;Correlation is a more advanced stats procedure, and not in the normal list of simple aggregate functions associated with SQL. &amp;nbsp;Therefore I would say no. &amp;nbsp;Create your correlations using IML or proc corr, then merge any results you need in the orginal data back on.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 17:06:29 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-12-02T17:06:29Z</dc:date>
    <item>
      <title>Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316293#M270914</link>
      <description>&lt;P&gt;Can anybody help me that how I can calculate the correlation between two variables within each group in Proc Sql? Is there any such function just as sum or mean? &lt;BR /&gt;&lt;BR /&gt;I want to do something like&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select groupvar, corr(var1, var2) from table&lt;/P&gt;
&lt;P&gt;group by groupvar;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need the correlation variable to be one column in the final aggregated dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 16:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316293#M270914</guid>
      <dc:creator>tomtom09</dc:creator>
      <dc:date>2016-12-02T16:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316300#M270915</link>
      <description>&lt;P&gt;You can't use SQL, you need PROC CORR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there's something in PROC CORR that doesn't meet your requirements specify it and we can help you customize your output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316300#M270915</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-02T17:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316302#M270916</link>
      <description>&lt;P&gt;Correlation is a more advanced stats procedure, and not in the normal list of simple aggregate functions associated with SQL. &amp;nbsp;Therefore I would say no. &amp;nbsp;Create your correlations using IML or proc corr, then merge any results you need in the orginal data back on.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316302#M270916</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-12-02T17:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316305#M270917</link>
      <description>&lt;P&gt;Thanks! I sorted the data and name it as outsort and I used the below code to create the correlation table. However there are a lot of informaiton there. Do you guys know what's the option that restrict the results only to correlation? Thanks again!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC CORR DATA= outsort OUTP=outcorr noprint;&lt;/P&gt;
&lt;P&gt;VAR var1 var2;&lt;/P&gt;
&lt;P&gt;BY groupvar;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:12:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316305#M270917</guid>
      <dc:creator>tomtom09</dc:creator>
      <dc:date>2016-12-02T17:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316309#M270918</link>
      <description>&lt;P&gt;I am not familiar with the proc corr that much, so would refer to the docs. &amp;nbsp;However one thing you can do (on all procedures) is to check out what its doing behind the scenes. &amp;nbsp;Put:&lt;/P&gt;
&lt;P&gt;ods trace on;&lt;/P&gt;
&lt;P&gt;Before your proc corr call, then in the log you will see all the objects that procedure creates. &amp;nbsp;(trace off turns it off again). &amp;nbsp;You can then select parts of the output by:&lt;/P&gt;
&lt;P&gt;ods output &amp;lt;objectname&amp;gt;=&amp;lt;datasetname&amp;gt;;&lt;/P&gt;
&lt;P&gt;Where object name comes from the log output of the objects name, and datasetname is the dataset you want to store the results in.&lt;/P&gt;
&lt;P&gt;In this way you can pull out bits of the output from a procedure.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316309#M270918</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-12-02T17:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316313#M270919</link>
      <description>&lt;P&gt;Noprint doesn't suppress the output?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are you referring to the outcorr dataset?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316313#M270919</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-02T17:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316315#M270920</link>
      <description>&lt;P&gt;Hi I am talking about the outcorr dataset. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 17:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316315#M270920</guid>
      <dc:creator>tomtom09</dc:creator>
      <dc:date>2016-12-02T17:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316316#M270921</link>
      <description>Thanks!</description>
      <pubDate>Fri, 02 Dec 2016 17:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-SAS/m-p/316316#M270921</guid>
      <dc:creator>tomtom09</dc:creator>
      <dc:date>2016-12-02T17:26:15Z</dc:date>
    </item>
  </channel>
</rss>

