<?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: how do i pull all the elements from the lower half of a matrix? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98024#M691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually it appears the symsqr function did what i needed.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Apr 2012 17:00:24 GMT</pubDate>
    <dc:creator>coug914</dc:creator>
    <dc:date>2012-04-29T17:00:24Z</dc:date>
    <item>
      <title>how do i pull all the elements from the lower half of a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98022#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to pull the lower half of a matrix in proc iml. It seems like the VECH function would work perfectly, but I'm running SAS 9.2 and VECH appears to be limited to 9.3. Any suggestions for alternatives? It's all inside a loop and the matrix size changes (with each loop), but these are fairly large matrices (e.g., 3000 X 3000). Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Apr 2012 15:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98022#M689</guid>
      <dc:creator>coug914</dc:creator>
      <dc:date>2012-04-28T15:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: how do i pull all the elements from the lower half of a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98023#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be recreated using a short function module,&amp;nbsp; but it is complicated slightly by the fact that the LOC function operates in row major order while the VECH function operates in column major order, and so the need to transpose the matrix.&amp;nbsp; The code below should do the trick, but I have no idea how efficient or inefficient this might be with your large matrices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&amp;nbsp; start vechalf(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a=nrow(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=a#a-1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(t(x)[loc(mod(0:b,a)&amp;gt;=int((0:b)/a))]);&lt;BR /&gt;&amp;nbsp; finish;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=shape(10:25,4,4);&lt;BR /&gt;&amp;nbsp; print x;&lt;BR /&gt;&amp;nbsp; y=vechalf(x);&lt;BR /&gt;&amp;nbsp; print y;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Apr 2012 09:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98023#M690</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2012-04-29T09:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: how do i pull all the elements from the lower half of a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98024#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually it appears the symsqr function did what i needed.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Apr 2012 17:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98024#M691</guid>
      <dc:creator>coug914</dc:creator>
      <dc:date>2012-04-29T17:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: how do i pull all the elements from the lower half of a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98025#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info, I had read &lt;A href="http://blogs.sas.com/content/iml/2012/03/21/creating-symmetric-matrices-two-useful-functions-with-strange-names/"&gt;this article &lt;/A&gt;and come to the conclusion that VECH was something completely new, but it appears that SYMSQR does the same thing, only it reads the lower diagonal elements in row-major order, so the two do give different results.&amp;nbsp; It would be nice if&amp;nbsp; the 9.3 documentation for VECH could&amp;nbsp; be changed to include a link to SYMSQR (and vice versa).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 07:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98025#M692</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2012-04-30T07:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: how do i pull all the elements from the lower half of a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98026#M693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion. The 9.3 documentation can't be changed, but the next release of the documentation will include links between SYMSQR &amp;lt;--&amp;gt; VECH and between SQRSYM &amp;lt;--&amp;gt; SQRVECH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 12:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-do-i-pull-all-the-elements-from-the-lower-half-of-a-matrix/m-p/98026#M693</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-04-30T12:48:14Z</dc:date>
    </item>
  </channel>
</rss>

