I have a big dataset A. The main variables in Data A are fico_score, account_number, charge_off.
I need to analysis these three variables. In every 5 score points range from min to max, to calculate the frequency of account_number, total balance of charge_off and also to show the range in the output.
The Dataset A I have like this kind:
Fico_Score Account_number Charge_off
450 123 2.5
450 456 2.1
451 213 .
.....
The result I expect to get likes this:
Score_band Freq_acct Total_CO
450-455 45 21.1
456- 460 23 31.1
.......
I tried these codes, but it didn’t work.
Data test;
set a;
retain Score_band Freq_amt Total_co;
do i = 450 to 830 by 5;
proc means data = a noprint;
var account_number charge_off;
where fico_score >= i and Fico_score < i+5;
output n = Freq_acct sum = Total_Co;
end;
run;
Could someone tell me some clues to code these?