I have account number and the ratings for the previous months and the current month like below
Account Number Aug Rating Account Number Sept Rating
100 A 100 A
200 D 123 F
300 C 400 B
400 A 500 C
500 D 300 C
-- -
-- -
I need the ouput in sas in such way that i need to know whether the how the ratings are moving compared to that previous month. I was able to get in this kind of excel , but need to write in SAS.
Any help is highly appreciated.
Sept Rating
Aug Rating A B C D E F
A 1 1
B
C 1
D 1
E
Thanks
Raj
From your description, the account numbers appear to be irrelevant. If so, I think creating a format and using proc tabulate will provide the output that you want. E.g.:
proc format;
value $rating
'A'='A'
'B'='B'
'C'='C'
'D'='D'
'F'='F'
;
run;
data have;
format Aug_Rating Sept_Rating $rating.;
input Account_Number (Aug_Rating Sept_Rating) ($);
cards;
100 A A
200 D F
300 C B
400 A C
500 D C
;
proc tabulate data=have ;
class Aug_Rating Sept_Rating /preloadfmt;
table Aug_Rating,Sept_Rating /printmiss ;
run;
your output and data is ambiguous.
1 is not in their right palce for output.
Ksharp
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.