BookmarkSubscribeRSS Feed
RamKumar
Fluorite | Level 6

I do services for banking and I need help to find the correlation between two variables. Interestingly I need to do with character variables and below are the sample data.

Our task is to sell loan products. Eg: many occasions people who brought mortgage loan is likely to buy auto loan.

Similarly I need to identify the loan products which has correlation.

product_dsc    loan_amt

AUTO LOAN       26,698.65

AUTO LOAN       15,000.00

AUTO LOAN     15,200.00

Used Auto        7,194.00

Personal loan   1,000.00

Used Auto     23,000.00

Used Auto    12,400.00

Any help would be really appreciated.

4 REPLIES 4
Ksharp
Super User

You need to focus the count number of person who have a loan  not load amount , then use proc freq or proc corresp  .

RamKumar
Fluorite | Level 6

Thanks Ksharp.

So you're suggesting me to use proc corresp instead of Proc corr because of character variables? My assignment is on correlation and I will be worried if we don't have relationship between proc corresp and proc corr

Ksharp
Super User

Yes. proc freq also can compute person,spearman correlation coefficient for category variable ,but you need frequency of people , check documentation.

BTW, you also could try proc corr ,but that will give you person product-moment correlation coefficient  if you have data like

name   home_load auto_load

Arthur.T   23    45

Peter.E   34  45

KSharp   56 78

Xia Keshan

stat_sas
Ammonite | Level 13

Hi,

Change your data structure to run correlation analysis. Identify people who are having more than one loan (auto_loan, used_auto etc.) then using proc corr can give some idea about the customers' behavior.

Id      AUTO_LOAN       Used_Auto     

1       26,698.65            7,194.00

2      15,000.00            23,000.00

3      15,200.00            12,400.00

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 4903 views
  • 0 likes
  • 3 in conversation