<?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 Matrix Multiplication Macro in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-Multiplication-Macro/m-p/264227#M2660</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My organization &lt;STRONG&gt;does not have IML&lt;/STRONG&gt;, only base SAS. So I'm using a macro compute matrix multiplications. This macro works but I have another macro that does matrix multiplaction i number of times. &amp;nbsp;When I run the following macro it only gives me a one period ahead matrix when it should give 6. Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro loop (n=);&lt;BR /&gt;%do i = 2 %to &amp;amp;n.;&lt;BR /&gt;data _null_; i_minus_1= &amp;amp;i.-1; call symput( 'i_minus_1', i_minus_1); run;&lt;BR /&gt;%if &amp;amp;i.=2 %then %do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; %mat_product (in_data1 = m1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ,in_data2 = m1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ,out_data = m&amp;amp;i. );&lt;BR /&gt;&amp;nbsp; %end;&lt;BR /&gt;&amp;nbsp; %else %do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;%mat_product (in_data1 = m1 , in_data2 = m&amp;amp;i_minus_1., out_data= m&amp;amp;i.);&lt;BR /&gt;&amp;nbsp; %end;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%loop (n=6);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Apr 2016 17:29:59 GMT</pubDate>
    <dc:creator>cmshaw91</dc:creator>
    <dc:date>2016-04-15T17:29:59Z</dc:date>
    <item>
      <title>Matrix Multiplication Macro</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-Multiplication-Macro/m-p/264227#M2660</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My organization &lt;STRONG&gt;does not have IML&lt;/STRONG&gt;, only base SAS. So I'm using a macro compute matrix multiplications. This macro works but I have another macro that does matrix multiplaction i number of times. &amp;nbsp;When I run the following macro it only gives me a one period ahead matrix when it should give 6. Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro loop (n=);&lt;BR /&gt;%do i = 2 %to &amp;amp;n.;&lt;BR /&gt;data _null_; i_minus_1= &amp;amp;i.-1; call symput( 'i_minus_1', i_minus_1); run;&lt;BR /&gt;%if &amp;amp;i.=2 %then %do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; %mat_product (in_data1 = m1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ,in_data2 = m1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ,out_data = m&amp;amp;i. );&lt;BR /&gt;&amp;nbsp; %end;&lt;BR /&gt;&amp;nbsp; %else %do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;%mat_product (in_data1 = m1 , in_data2 = m&amp;amp;i_minus_1., out_data= m&amp;amp;i.);&lt;BR /&gt;&amp;nbsp; %end;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%loop (n=6);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 17:29:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-Multiplication-Macro/m-p/264227#M2660</guid>
      <dc:creator>cmshaw91</dc:creator>
      <dc:date>2016-04-15T17:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Multiplication Macro</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-Multiplication-Macro/m-p/264331#M2661</link>
      <description>I would use DATA STEP to calculate ,not MACRO which would lost accuracy .</description>
      <pubDate>Sat, 16 Apr 2016 03:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-Multiplication-Macro/m-p/264331#M2661</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-16T03:36:39Z</dc:date>
    </item>
  </channel>
</rss>

