<?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: Pearson correlation coefficient in SAS vs Excel in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306939#M16247</link>
    <description>&lt;P&gt;Does your Excel data have "missing" values? If so, how are they represented. Sometimes folks use a 0 or -99 or such in Excel which actually gets included in calculations.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 19:58:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-10-24T19:58:16Z</dc:date>
    <item>
      <title>Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306900#M16241</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Using the same dataset with no missing values, I get a different value for the Pearson correlation coefficient from SAS Proc Corr than my colleague and I get using the Correl function in Excel. &amp;nbsp;Does anyone know what might be the reason?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc corr data=all pearson;&lt;BR /&gt;var bb;&lt;BR /&gt;with aa;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306900#M16241</guid>
      <dc:creator>JenniferB</dc:creator>
      <dc:date>2016-10-24T18:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306904#M16243</link>
      <description>&lt;P&gt;Can you provide an example? The following SAS data set gives the same results up to the format being used.&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Corr: Pearson Correlations" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r stacked_cell data"&gt;
&lt;TABLE border="0" width="100%" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data top_stacked_value"&gt;
&lt;P&gt;0.99891&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Excel Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Corr: Pearson Correlations" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r stacked_cell data"&gt;
&lt;TABLE width="143"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="143"&gt;0.998906107&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Except for the fact that Excel prints more digits, this is the same result.&lt;/P&gt;
&lt;P&gt;Excel directions:&amp;nbsp;&lt;A href="https://support.office.com/en-us/article/CORREL-function-995dcef7-0c0a-4bed-a3fb-239d7b68ca92" target="_blank"&gt;https://support.office.com/en-us/article/CORREL-function-995dcef7-0c0a-4bed-a3fb-239d7b68ca92&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;SAS Code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data all;
input bb aa;
datalines;
3	9
2	. 
4	12
. 	15
6	17
;

proc corr data=all pearson;
var bb;
with aa;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306904#M16243</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-10-24T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306939#M16247</link>
      <description>&lt;P&gt;Does your Excel data have "missing" values? If so, how are they represented. Sometimes folks use a 0 or -99 or such in Excel which actually gets included in calculations.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/306939#M16247</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-24T19:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307155#M16257</link>
      <description>&lt;P&gt;Thanks for the suggestion. &amp;nbsp;Upon further examination, indeed it was the -99 that was causing the problem. &amp;nbsp;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307155#M16257</guid>
      <dc:creator>JenniferB</dc:creator>
      <dc:date>2016-10-25T15:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307157#M16258</link>
      <description>&lt;P&gt;Thank you for looking into my issue. &amp;nbsp;We figured out from the below that there was a -99 in the excel file that was causing the problem.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307157#M16258</guid>
      <dc:creator>JenniferB</dc:creator>
      <dc:date>2016-10-25T15:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation coefficient in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307173#M16260</link>
      <description>&lt;P&gt;Glad you figured it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although using -99 to indicate a missing value was popular in the 1970s, it is usually discouraged nowadays because of problems like this. If the spreadsheet contains empty cells, I think most Excel statistical functions correctly treat the empty cell as a missing value.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Pearson-correlation-coefficient-in-SAS-vs-Excel/m-p/307173#M16260</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-10-25T15:55:01Z</dc:date>
    </item>
  </channel>
</rss>

