<?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: translating a loop into proc iml in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457762#M4151</link>
    <description>&lt;P&gt;Much of this is not defined enough for us to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PD_base PD_up PD_down (what are these? how do they relate to PD1 through PD9)&lt;/P&gt;
&lt;P&gt;rating classes not defined&lt;/P&gt;
&lt;P&gt;scalar $j_ttc not defined&lt;/P&gt;
&lt;P&gt;PD_ttc not defined (how do these relate to the other PD numbers??)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, we probably aren't go to do the work for you. You need to take a crack at actually creating code to do this, and if you get stuck, we ought to be able to help at that point.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2018 14:22:07 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-04-26T14:22:07Z</dc:date>
    <item>
      <title>translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457760#M4150</link>
      <description>&lt;P&gt;I need to translate this loop done in the software GRETL to SAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;loop foreach s PD1 PD2 PD3 PD4 PD5 PD6 PD7 PD8 PD9 -- quiet&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 1st loop over the different scenarios loop foreach j PD_base PD_up PD_down --quiet # 2nd loop over the rating classes scalar $j_ttc = mean($j) # TTC PDs at rating-level series $j_bayes_$s = $s / ( $s + (1-$s) * (1-$j_ttc)/$j_ttc * PD_ttc/(1-PD_ttc) )&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Bayesian formula scalar $j_bayes_$s[T_pd] = $j[T_pd] # Rq: starting date = T_pd endloop endloop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BY the end I will have 27 varaibles: ( PD1 PD2 PD3 PD4 PD5 PD6 PD7 PD8 PD9 ) * (PD_base PD_up PD_down ) 9 PDS * 3 scenarios (PD_base PD_up PD_down) PD1_bayes_PD_base PD2_bayes_PD_base PD3_bayes_PD_base PD4_bayes_PD_base PD5_bayes_PD_base PD6_bayes_PD_base PD7_bayes_PD_base PD8_bayes_PD_base PD9_bayes_PD_base PD1_bayes_PD_up PD2_bayes_PD_up PD3_bayes_PD_up PD4_bayes_PD_up PD5_bayes_PD_up PD6_bayes_PD_up PD7_bayes_PD_up PD8_bayes_PD_up PD9_bayes_PD_up PD1_bayes_PD_down PD2_bayes_PD_down PD3_bayes_PD_down PD4_bayes_PD_down PD5_bayes_PD_down PD6_bayes_PD_down PD7_bayes_PD_down PD8_bayes_PD_down PD9_bayes_PD_down PD1_bayes_PD_final PD2_bayes_PD_final PD3_bayes_PD_final PD4_bayes_PD_final PD5_bayes_PD_final PD6_bayes_PD_final PD7_bayes_PD_final PD8_bayes_PD_final PD9_bayes_PD_final Any help should be great. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457760#M4150</guid>
      <dc:creator>jorgesribeiro</dc:creator>
      <dc:date>2018-04-26T14:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457762#M4151</link>
      <description>&lt;P&gt;Much of this is not defined enough for us to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PD_base PD_up PD_down (what are these? how do they relate to PD1 through PD9)&lt;/P&gt;
&lt;P&gt;rating classes not defined&lt;/P&gt;
&lt;P&gt;scalar $j_ttc not defined&lt;/P&gt;
&lt;P&gt;PD_ttc not defined (how do these relate to the other PD numbers??)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, we probably aren't go to do the work for you. You need to take a crack at actually creating code to do this, and if you get stuck, we ought to be able to help at that point.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457762#M4151</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-26T14:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457764#M4152</link>
      <description>&lt;P&gt;I don't know what GRETL is or what you are trying to accomplish.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe these will help you get started:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/09/07/loops-in-sas.html" target="_self"&gt;Overview of loops in SAS and SAS/IML&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/06/09/generate-a-grid-of-points.html" target="_self"&gt;How to use the EXPANDGRID function to generate Cartesian products of values&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457764#M4152</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-26T14:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457770#M4153</link>
      <description>&lt;P&gt;The loop is working as a Macro replacing PD1 TO PD9 and permuting the other 3 variables.&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;SPAN&gt;PD_ttc =0.521 it is a constant&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jorge&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457770#M4153</guid>
      <dc:creator>jorgesribeiro</dc:creator>
      <dc:date>2018-04-26T14:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457772#M4154</link>
      <description>&lt;P&gt;What I need it si not a Do loop,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I do loop that LOOPS using the name of the variables to be permutaded&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;JOrge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457772#M4154</guid>
      <dc:creator>jorgesribeiro</dc:creator>
      <dc:date>2018-04-26T14:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457775#M4155</link>
      <description>&lt;P&gt;I am sure we can help you if you provide a simple example that&amp;nbsp;starts with what you have and explains what you want. Usually, three or four values is sufficient.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 14:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457775#M4155</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-26T14:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: translating a loop into proc iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457799#M4156</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The loop is working as a Macro replacing PD1 TO PD9 and permuting the other 3 variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And "permuting the other 3 values" is not well defined either.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Really, there needs to be a lot more explanation and example given before we could begin to help you. Or better yet, you try to create such a loop and then if you get stuck, we ought to be able to figure out what the problem is and how to fix it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 15:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/translating-a-loop-into-proc-iml/m-p/457799#M4156</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-26T15:55:55Z</dc:date>
    </item>
  </channel>
</rss>

