<?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 Getting Mean Correlations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791493#M253532</link>
    <description>&lt;P&gt;My data looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ericdrosano_0-1642782820674.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67600iB633F3DBF4BD921D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ericdrosano_0-1642782820674.png" alt="ericdrosano_0-1642782820674.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to do the following:&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;The correlations of OX of each member firm are determined with every other member firm in the same SIC3 group, by firm, over the five-year period.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;I have tried pairwise matching by SIC3YEAR, and this successfully gives me the following :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ericdrosano_1-1642783001015.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67601i1AFB28E744C89DE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ericdrosano_1-1642783001015.png" alt="ericdrosano_1-1642783001015.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BUT I can't seem to get correlations between each individual firm-year and their SIC3 peers, which I believe I need in order to sum the SIC3 total, before then dividing by&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;I have used so many variations of &lt;STRONG&gt;proc corr&lt;/STRONG&gt;&amp;nbsp;with ox and p_ox and even done the grouping before pairwise matching, but I am doing something wrong.&lt;/P&gt;
&lt;P&gt;Code help is greatly appreciated; thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 16:40:02 GMT</pubDate>
    <dc:creator>ericdrosano</dc:creator>
    <dc:date>2022-01-21T16:40:02Z</dc:date>
    <item>
      <title>Getting Mean Correlations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791493#M253532</link>
      <description>&lt;P&gt;My data looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ericdrosano_0-1642782820674.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67600iB633F3DBF4BD921D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ericdrosano_0-1642782820674.png" alt="ericdrosano_0-1642782820674.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to do the following:&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;The correlations of OX of each member firm are determined with every other member firm in the same SIC3 group, by firm, over the five-year period.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;I have tried pairwise matching by SIC3YEAR, and this successfully gives me the following :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ericdrosano_1-1642783001015.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67601i1AFB28E744C89DE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ericdrosano_1-1642783001015.png" alt="ericdrosano_1-1642783001015.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BUT I can't seem to get correlations between each individual firm-year and their SIC3 peers, which I believe I need in order to sum the SIC3 total, before then dividing by&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;I have used so many variations of &lt;STRONG&gt;proc corr&lt;/STRONG&gt;&amp;nbsp;with ox and p_ox and even done the grouping before pairwise matching, but I am doing something wrong.&lt;/P&gt;
&lt;P&gt;Code help is greatly appreciated; thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 16:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791493#M253532</guid>
      <dc:creator>ericdrosano</dc:creator>
      <dc:date>2022-01-21T16:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Mean Correlations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791508#M253542</link>
      <description>&lt;P&gt;To get correlations from PROC CORR, each firm would have to have their data in its own column, rather than the layout you have shown where (I assume) all the data is in one great big long data set (but you really show us only one time period, so how would I know?) If so, you could use PROC TRANSPOSE to get the data in the desired format. Of course, we can't work from screen captures, please provide a portion of your data (with at least 3 time periods) as SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not really a good person to talk about time-series analyses, but I think there might be a SAS/ETS procedure that can compute correlations with your long data sets. But I can't be more specific.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 17:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791508#M253542</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-21T17:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Mean Correlations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791516#M253546</link>
      <description>&lt;P&gt;The dataset in the first image does contain each firm's data is in their own columns. The dataset in the second image is the pairwise combination of each firm, each year with each of their SIC3 peers in that year. Thus, all the data in the dataset the first image is what I use to pairwise match to create the dataset in the second image.&lt;BR /&gt;As far as uploading data, I may be able to once SAS has completed running my current code, which is already about 10 minutes in and I expect will take much longer.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 17:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791516#M253546</guid>
      <dc:creator>ericdrosano</dc:creator>
      <dc:date>2022-01-21T17:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Mean Correlations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791517#M253547</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The dataset in the first image does contain each firm's data is in their own columns.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show us. And provide the data in a usable form, as I described.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 17:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Mean-Correlations/m-p/791517#M253547</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-21T17:26:25Z</dc:date>
    </item>
  </channel>
</rss>

