<?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: Different Correlations from PROC TIMESERIES and PROC CORR in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716872#M34678</link>
    <description>&lt;P&gt;The formulas on the documentation page you provided explain why you are not getting the same values when there is a lag. Note that in the cross covariance formula it is always the mean of y that is being used regardless of the lag value. In your example code the variables gtresiduals (y) and gt3 (the lagged values you created) will (very likely) have different means. As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;said the two procedures are computing different quantities.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Feb 2021 18:52:27 GMT</pubDate>
    <dc:creator>MichaelL_SAS</dc:creator>
    <dc:date>2021-02-04T18:52:27Z</dc:date>
    <item>
      <title>Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716626#M34663</link>
      <description>&lt;P&gt;I ran a cross-correlation analysis using PROC TIMESERIES, and found a correlation of 0.51695 at a lag of 1. I wanted to then find the associated significance level, so I created a new data set with the appropriate lag and applied PROC CORR, which gave me 0.52006. I also tested the correlation w/o any lag and both gave me exactly&amp;nbsp;&lt;SPAN&gt;0.1460650864, so I presume it's an error somewhere with the lagging. I looked at the outputted datasets however, and it all seems to be in order. The difference is pretty minor, but should I be concerned?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54295iBA4C61BAF23DD89C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas1.PNG" alt="sas1.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc timeseries data=final2 crossplots=ccf outcrosscorr=final3;
id weeks interval=day accumulate=none;
var ncresiduals gtresiduals;
run;


data final4;
set final2;
gt3=lag(gtresiduals);
run;

proc corr pearson data=final4 out=final5;
var gt3;
with ncresiduals;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Feb 2021 19:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716626#M34663</guid>
      <dc:creator>hussier1</dc:creator>
      <dc:date>2021-02-03T19:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716642#M34664</link>
      <description>&lt;P&gt;PROC TIMESERIES (as far as I know), does not compute correlations, it computes auto-correlations, and so this should not be the same as PROC CORR which does computer correlations.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 20:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716642#M34664</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-03T20:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716647#M34665</link>
      <description>I based my code on this : &lt;A href="https://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_timeseries_sect024.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_timeseries_sect024.htm&lt;/A&gt;, and the graphical output is marked "cross-correlation" on top, so I don't think that's the issue.</description>
      <pubDate>Wed, 03 Feb 2021 20:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716647#M34665</guid>
      <dc:creator>hussier1</dc:creator>
      <dc:date>2021-02-03T20:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716657#M34666</link>
      <description>&lt;P&gt;Cross correlations from PROC TIMESERIES are not the same as CORRELATIONS from PROC CORR. I don't think they should match.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 20:51:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716657#M34666</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-03T20:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716658#M34667</link>
      <description>If they're done at the same lag, shouldn't they? They match for lag zero, and did match when I did something similar with a different dataset.</description>
      <pubDate>Wed, 03 Feb 2021 20:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716658#M34667</guid>
      <dc:creator>hussier1</dc:creator>
      <dc:date>2021-02-03T20:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different Correlations from PROC TIMESERIES and PROC CORR</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716872#M34678</link>
      <description>&lt;P&gt;The formulas on the documentation page you provided explain why you are not getting the same values when there is a lag. Note that in the cross covariance formula it is always the mean of y that is being used regardless of the lag value. In your example code the variables gtresiduals (y) and gt3 (the lagged values you created) will (very likely) have different means. As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;said the two procedures are computing different quantities.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 18:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Different-Correlations-from-PROC-TIMESERIES-and-PROC-CORR/m-p/716872#M34678</guid>
      <dc:creator>MichaelL_SAS</dc:creator>
      <dc:date>2021-02-04T18:52:27Z</dc:date>
    </item>
  </channel>
</rss>

