<?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: Tiered Correlation Matrix in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527143#M5234</link>
    <description>Am i going to have to transpose these expense types into variables to able to get a correlation between them?&lt;BR /&gt;&lt;BR /&gt; Unfortunately yes.</description>
    <pubDate>Mon, 14 Jan 2019 21:44:37 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-14T21:44:37Z</dc:date>
    <item>
      <title>Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527138#M5232</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a correlation matrix where I get the pearson value for each of the ExpenseType's against the others using the "Value" variable. However, I only want these for quarters (months 1-4, 5-8, etc..). A snap shot of my data is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; input STUDYNO:32. PID:BEST. Day_1826:DATE9. Day_InitialIW:DATE9. TRICHOT_1YR:BEST12. Personal_consumption_expenditure:BEST12. Month:32. Interval:$5. TimeFrame:$20. ExpenseType:$20. Value:32.;
  format PID BEST. Day_1826 DATE9. Day_InitialIW DATE9. TRICHOT_1YR BEST12. Personal_consumption_expenditure BEST12.;
  label STUDYNO="Sample size: 55,144,41,185,191, Total:616" PID="SUBJID#" Day_1826="Day1826" Day_InitialIW="IWInitial" TRICHOT_1YR="RA 273, UR 140, RNA 80, Missing 123";
datalines;
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr House 3164.5029543
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Consume 820.0784735
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Durable .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Health 332.71026714
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Insure .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Loan 0
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Tax .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Educa .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Gift 16262.542769
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Enter 209.70802449
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Recre 0
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr FinPlan .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Legala 0
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr IncomeTL 61368.08592
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr Trans 3334.881462
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PreResYr AlcSpend 72.87460203
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PostResYr House 3075.6491125
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PostResYr Consume 808.7741655
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PostResYr Durable .
2 486 30DEC1992 05OCT1993 1 68.892 1 Month PostResYr Health 316.74626874&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The code that I have been tinkering with looks like this:&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= Sub.Tall_M_IndEXP_Better_JB_011119;
var value;
by ExpenseType;
where Month between 1 and 4;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;However, this gives me the 15 separate correlations when I want a matrix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions? Am i going to have to transpose these expense types into variables to able to get a correlation between them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 21:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527138#M5232</guid>
      <dc:creator>joebacon</dc:creator>
      <dc:date>2019-01-14T21:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527143#M5234</link>
      <description>Am i going to have to transpose these expense types into variables to able to get a correlation between them?&lt;BR /&gt;&lt;BR /&gt; Unfortunately yes.</description>
      <pubDate>Mon, 14 Jan 2019 21:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527143#M5234</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-14T21:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527174#M5238</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241893"&gt;@joebacon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a correlation matrix where I get the pearson value for each of the ExpenseType's against the others using the "Value" variable. However, I only want these for quarters (months 1-4, 5-8, etc..). A snap shot of my data is below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Quarters when referring to dates generally are 3-month long intervals. You are indicating thirds, groups of 4-month long periods. Which is correct quarter with months 1-3, 4-6, 7-9 and 10-12 or thirds?&lt;/P&gt;
&lt;P&gt;Next, months of which date variable, Day_1826 or Day_Initial or that Month variable that has not apparent connection to any date?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A matrix, if I understand your desire, likely means that you need to have multiple variables on&amp;nbsp;either the&amp;nbsp;VAR or WITH statements, or possibly both. If you want a correlation between House and Consume expenditures then you need one variable for each on the same record. Which is why &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;says you'll need to transpose your data somewhat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may get a more concrete solution if you provide data for only 3 of the expense types and multiple months so there is more data to work with.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 23:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527174#M5238</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-14T23:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527305#M5257</link>
      <description>Oops. You are absolutely correct in that I was indicating thirds instead of quarters.&lt;BR /&gt;&lt;BR /&gt;I had the other Day_ variables in there from another analysis. I would need the month variables (i.e. 1-3, 3-6, etc.).&lt;BR /&gt;&lt;BR /&gt;I would want multiple variables and wanted to see if I could essentially turn one of my variables into several by utilizing by group processing.&lt;BR /&gt;&lt;BR /&gt;However, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; has informed me of my need to transpose. Now to research how to do that.&lt;BR /&gt;&lt;BR /&gt;Thanks all. You both were very helpful. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527305#M5257</guid>
      <dc:creator>joebacon</dc:creator>
      <dc:date>2019-01-15T14:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527572#M5299</link>
      <description>PROC TRANSPOSE.</description>
      <pubDate>Wed, 16 Jan 2019 00:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527572#M5299</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-16T00:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Tiered Correlation Matrix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527709#M5308</link>
      <description>Haha! Shortly after a google search, I figured it out. Not too complicated.&lt;BR /&gt;&lt;BR /&gt;I am currently trying to color code the correlation matrix.</description>
      <pubDate>Wed, 16 Jan 2019 14:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Tiered-Correlation-Matrix/m-p/527709#M5308</guid>
      <dc:creator>joebacon</dc:creator>
      <dc:date>2019-01-16T14:10:30Z</dc:date>
    </item>
  </channel>
</rss>

