BookmarkSubscribeRSS Feed
Satyakshma
Fluorite | Level 6

Hi,

 

I have to calculated predicted PD for year 2015, 2016 and 2017 for Bucket1, Bucket2, Bucket3 and Bucket4 using a Z_score and an Index value. I already have Z_Score from other table, but I need to generate an Index value (which is a random value).
The Index value 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.

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.

Please help me with this code.

Attached is the Input table and desired output table in excel file:

Table 1: Using Z Score from this

Table 2: Bucket-wise Actual PDs for each year

Table 3: Highlighted yellow values are index values generated, and used in calculating predicted values

Table 4: Min sum of squares between actual and predicted and Index value.

 

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. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 282 views
  • 0 likes
  • 1 in conversation