I need to translate this loop done in the software GRETL to SAS loop foreach s PD1 PD2 PD3 PD4 PD5 PD6 PD7 PD8 PD9 -- quiet # 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) ) # Bayesian formula scalar $j_bayes_$s[T_pd] = $j[T_pd] # Rq: starting date = T_pd endloop endloop 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
... View more