<?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: Correlation matrix to vector no diagonal and duplicates in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705658#M5355</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
use sashelp.class;
read all var _num_ into x;
close;
corr=corr(x);
idx=loc(row(corr)&amp;gt;col(corr));
want=unique(corr[idx]);
print corr ,want;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Dec 2020 12:54:11 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-12-14T12:54:11Z</dc:date>
    <item>
      <title>Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705642#M5353</link>
      <description>&lt;P&gt;Dear friends, consider correlation matrix (attached)&amp;nbsp;and variables IBS_A, IBS_B and IBS_C. This is short example. I usually have much larger matrices with mostly unknown number of variables (goal is to have universal solution). I would like to obtain a vector "New" which would use data without diagonal and duplicates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;New&lt;/P&gt;&lt;P&gt;0,5&lt;/P&gt;&lt;P&gt;0,625&lt;/P&gt;&lt;P&gt;0,5&lt;/P&gt;&lt;P&gt;This is actually corelation between ab, ac, and ac. other is surplus. Can this be done?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 12:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705642#M5353</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T12:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705644#M5354</link>
      <description>&lt;P&gt;I think you forgot to post your question?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 11:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705644#M5354</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-12-14T11:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705658#M5355</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
use sashelp.class;
read all var _num_ into x;
close;
corr=corr(x);
idx=loc(row(corr)&amp;gt;col(corr));
want=unique(corr[idx]);
print corr ,want;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Dec 2020 12:54:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705658#M5355</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-12-14T12:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705661#M5356</link>
      <description>Actually I started to write and in the process my mother called... Total mess &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Mon, 14 Dec 2020 12:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705661#M5356</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T12:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705665#M5357</link>
      <description>&lt;P&gt;Looks perfect!&lt;/P&gt;&lt;P&gt;Let me try it on real data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705665#M5357</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T13:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705666#M5358</link>
      <description>&lt;P&gt;See the article &lt;A href="https://blogs.sas.com/content/iml/2012/08/16/extract-the-lower-triangular-elements-of-a-matrix.html" target="_self"&gt;"Extract the lower triangular elements of a matrix,"&lt;/A&gt; which defines a function called StrictLowerTriangular.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you also want to get the pairs of variable names for each entry, see the code in &lt;A href="https://blogs.sas.com/content/iml/2017/08/16/pairwise-correlations-bar-chart.html" target="_self"&gt;this blog post about pairwise correlations&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705666#M5358</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-12-14T13:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705669#M5359</link>
      <description>&lt;P&gt;I think KSharp's code will work for you, but you may want to remove the call to UNIQUE as it will give you a vector with the correlation coefficients sorted into order - which you may not want.&amp;nbsp; It will also remove duplicates if there are any.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705669#M5359</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2020-12-14T13:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705672#M5360</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;For the moment it looks OK.&lt;/P&gt;&lt;P&gt;I removed unwanted parts and i am checking on few files will I get all values.&lt;/P&gt;&lt;P&gt;Order is not important for now, because all I want to do later is to plot box plots from multiple matrices. This is actually genomic relationship matrix for one population and those values and its variance will be compared (via box plot) with another population.&lt;/P&gt;&lt;P&gt;So order is not important. Just unique pairs (a-c is fine, c-a is exactly the same, and diagonal must be one).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705672#M5360</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T13:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705675#M5361</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I knew about&amp;nbsp;&lt;SPAN&gt;StrictLowerTriangular but this "unique" part was an&amp;nbsp;issue. It is easy&amp;nbsp;with 5-10&amp;nbsp;animals but with 1000 and more...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705675#M5361</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T13:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation matrix to vector no diagonal and duplicates</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705677#M5362</link>
      <description>Works awesome!&lt;BR /&gt;You saved hours of my life.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Mon, 14 Dec 2020 13:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlation-matrix-to-vector-no-diagonal-and-duplicates/m-p/705677#M5362</guid>
      <dc:creator>MajaAGR</dc:creator>
      <dc:date>2020-12-14T13:40:37Z</dc:date>
    </item>
  </channel>
</rss>

