<?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 Generate an index value used in calculating Predicted values and optimize Sum square error in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Generate-an-index-value-used-in-calculating-Predicted-values-and/m-p/763940#M37375</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to calculated predicted PD for year 2015, 2016 and 2017 for Bucket1, Bucket2, Bucket3 and Bucket4 using a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z_score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Index value&lt;/STRONG&gt;. I already have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z_Score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from other table, but I need to generate an&amp;nbsp;&lt;STRONG&gt;Index value&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;(which is a&amp;nbsp;random value).&lt;BR /&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Index value&lt;/STRONG&gt;&amp;nbsp;to be generated should be such that that when we calculate predicted PD using it for each year. The sum square errors of Predicted PDs and Actual PDs should be minimum.&lt;/P&gt;&lt;P&gt;I am able to do this in Excel using Run solver, and I need to do this using loops and array in BASE SAS in SAS EG as I don't have SAS/IML or SAS/OR COMPONENT. The only component statistical component available is SAS/STATS and Base SAS.&lt;/P&gt;&lt;P&gt;Please help me with this code.&lt;/P&gt;&lt;P&gt;Attached is the Input table and desired output table in excel file:&lt;/P&gt;&lt;P&gt;Table 1: Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z Score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from this&lt;/P&gt;&lt;P&gt;Table 2: Bucket-wise Actual PDs for each year&lt;/P&gt;&lt;P&gt;Table 3: Highlighted yellow values are index values generated, and used in calculating predicted values&lt;/P&gt;&lt;P&gt;Table 4: Min sum of squares between actual and predicted and Index value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I am new to loops and arrays, I am not able to build logic around this. Please help with this, as I am in urgent need to perform this calculation in SAS EG.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Aug 2021 18:13:59 GMT</pubDate>
    <dc:creator>Satyakshma</dc:creator>
    <dc:date>2021-08-25T18:13:59Z</dc:date>
    <item>
      <title>Generate an index value used in calculating Predicted values and optimize Sum square error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Generate-an-index-value-used-in-calculating-Predicted-values-and/m-p/763940#M37375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to calculated predicted PD for year 2015, 2016 and 2017 for Bucket1, Bucket2, Bucket3 and Bucket4 using a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z_score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Index value&lt;/STRONG&gt;. I already have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z_Score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from other table, but I need to generate an&amp;nbsp;&lt;STRONG&gt;Index value&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;(which is a&amp;nbsp;random value).&lt;BR /&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Index value&lt;/STRONG&gt;&amp;nbsp;to be generated should be such that that when we calculate predicted PD using it for each year. The sum square errors of Predicted PDs and Actual PDs should be minimum.&lt;/P&gt;&lt;P&gt;I am able to do this in Excel using Run solver, and I need to do this using loops and array in BASE SAS in SAS EG as I don't have SAS/IML or SAS/OR COMPONENT. The only component statistical component available is SAS/STATS and Base SAS.&lt;/P&gt;&lt;P&gt;Please help me with this code.&lt;/P&gt;&lt;P&gt;Attached is the Input table and desired output table in excel file:&lt;/P&gt;&lt;P&gt;Table 1: Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Z Score&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from this&lt;/P&gt;&lt;P&gt;Table 2: Bucket-wise Actual PDs for each year&lt;/P&gt;&lt;P&gt;Table 3: Highlighted yellow values are index values generated, and used in calculating predicted values&lt;/P&gt;&lt;P&gt;Table 4: Min sum of squares between actual and predicted and Index value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I am new to loops and arrays, I am not able to build logic around this. Please help with this, as I am in urgent need to perform this calculation in SAS EG.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 18:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Generate-an-index-value-used-in-calculating-Predicted-values-and/m-p/763940#M37375</guid>
      <dc:creator>Satyakshma</dc:creator>
      <dc:date>2021-08-25T18:13:59Z</dc:date>
    </item>
  </channel>
</rss>

