386.Can SAS Really Predict Microfinance Loan Risk and Fraud Before It Happens?

Can SAS Really Predict Microfinance Loan Risk and Fraud Before It Happens?

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HERE IN THIS PROJECT WE USED THESE SAS STATEMENTS —
DATA STEP | PROC SQL |  PROC PRINT | PROC SGPLOT | MACROS | PROC CORR | PROC MEANS | PROC FREQ | PROC UNIVARIATE | APPEND | PROC SORT | MERGE | PROC DATASETS DELETE | DATA FUNCTIONS

Table Of Contents

  1. Introduction
  2. Business Context
  3. Dataset Creation (15+ observations with dates)
  4. Data Manipulation (SET, MERGE, APPEND, TRANSPOSE)
  5. Character & Numeric Functions
  6. Utilization Classification Macro
  7. Fraud Detection Macro
  8. PROC SQL Analytics
  9. PROC FREQ
  10. PROC MEANS
  11. PROC UNIVARIATE
  12. PROC CORR
  13. PROC SGPLOT
  14. PROC DATASETS (Delete)

1. INTRODUCTION

Microfinance plays a critical role in financial inclusion, especially in countries like India where millions of people lack access to formal banking systems. Microfinance institutions (MFIs) provide small loans to low-income individuals for:

  • Agriculture
  • Small businesses
  • Education
  • Livelihood activities

However, MFIs face serious challenges:

  • Loan defaults
  • Fraudulent borrowers
  • High-risk regions
  • Poor repayment discipline

This project simulates a real microfinance loan system and demonstrates how SAS analytics can be used to:

  • Identify high-risk customers
  • Detect fraud
  • Analyze loan behavior
  • Support business decisions

2. BUSINESS CONTEXT 

Imagine you are a SAS Programmer at a Microfinance Company.

Your management asks:

"We have thousands of loans. Which ones are risky? Which regions default more? Are we giving loans to fraud customers?"

You are given loan data and asked to build:

  • Risk classification logic
  • Fraud detection model
  • Analytical dashboards
  • Statistical insights

This project is exactly that.

3. DATASET CREATION

data microfinance_loans;

    input Loan_ID $ Region $ Loan_Amount Interest_Rate Repayment_Duration Default_Flag 

          Loan_Date:date9.;

    format Loan_Date date9.;

    datalines;

L001 South 50000 12.5 24 0 01JAN2023

L002 North 75000 14.2 36 1 15FEB2023

L003 East 30000 10.8 12 0 10MAR2023

L004 West 120000 16.5 48 1 20APR2023

L005 South 45000 11.2 18 0 05MAY2023

L006 North 95000 17.8 60 1 11JUN2023

L007 East 38000 9.5 12 0 02JUL2023

L008 West 200000 19.2 72 1 19AUG2023

L009 South 60000 13.5 24 0 10SEP2023

L010 North 82000 15.1 36 1 21OCT2023

L011 East 28000 10.0 12 0 11NOV2023

L012 West 150000 18.4 60 1 15DEC2023

L013 South 55000 12.0 24 0 05JAN2024

L014 North 90000 16.0 48 1 22FEB2024

L015 East 35000 11.0 18 0 10MAR2024

L016 West 180000 20.0 72 1 01APR2024

;

run;

proc print data=microfinance_loans;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_Date
1L001South5000012.524001JAN2023
2L002North7500014.236115FEB2023
3L003East3000010.812010MAR2023
4L004West12000016.548120APR2023
5L005South4500011.218005MAY2023
6L006North9500017.860111JUN2023
7L007East380009.512002JUL2023
8L008West20000019.272119AUG2023
9L009South6000013.524010SEP2023
10L010North8200015.136121OCT2023
11L011East2800010.012011NOV2023
12L012West15000018.460115DEC2023
13L013South5500012.024005JAN2024
14L014North9000016.048122FEB2024
15L015East3500011.018010MAR2024
16L016West18000020.072101APR2024

Used for row-level transformations.

Used to read dataset sequentially.


4. CHARACTER & NUMERIC FUNCTIONS

data loans_clean;

    set microfinance_loans;


    Region_Proper = propcase(strip(Region));

    Loan_Category = catx('-', Region_Proper, Loan_ID);

    Risk_Score = Loan_Amount * Interest_Rate / Repayment_Duration;


    Loan_Amount_Filled = coalesce(Loan_Amount, 0);

    Region_Upper = upcase(Region);

    Region_Lower = lowcase(Region);

run;

proc print data=loans_clean;

 var Loan_ID Region Region_Proper Loan_Category Risk_Score Loan_Amount_Filled 

     Region_Upper Region_Lower;

run;

OUTPUT:

ObsLoan_IDRegionRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_Lower
1L001SouthSouthSouth-L00126041.6750000SOUTHsouth
2L002NorthNorthNorth-L00229583.3375000NORTHnorth
3L003EastEastEast-L00327000.0030000EASTeast
4L004WestWestWest-L00441250.00120000WESTwest
5L005SouthSouthSouth-L00528000.0045000SOUTHsouth
6L006NorthNorthNorth-L00628183.3395000NORTHnorth
7L007EastEastEast-L00730083.3338000EASTeast
8L008WestWestWest-L00853333.33200000WESTwest
9L009SouthSouthSouth-L00933750.0060000SOUTHsouth
10L010NorthNorthNorth-L01034394.4482000NORTHnorth
11L011EastEastEast-L01123333.3328000EASTeast
12L012WestWestWest-L01246000.00150000WESTwest
13L013SouthSouthSouth-L01327500.0055000SOUTHsouth
14L014NorthNorthNorth-L01430000.0090000NORTHnorth
15L015EastEastEast-L01521388.8935000EASTeast
16L016WestWestWest-L01650000.00180000WESTwest

Used to standardize text data for joins and reports.

Used for risk calculations and scoring.


5. DATE FUNCTIONS (MDY, INTCK, INTNX)

data loans_dates;

    set loans_clean;

    Review_Date = intnx('month', Loan_Date, 6);

    Loan_Age_Months = intck('month', Loan_Date, today());

    format Review_Date date9.;

run;

proc print data=loans_dates;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_DateRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_LowerReview_DateLoan_Age_Months
1L001South5000012.524001JAN2023SouthSouth-L00126041.6750000SOUTHsouth01JUL202336
2L002North7500014.236115FEB2023NorthNorth-L00229583.3375000NORTHnorth01AUG202335
3L003East3000010.812010MAR2023EastEast-L00327000.0030000EASTeast01SEP202334
4L004West12000016.548120APR2023WestWest-L00441250.00120000WESTwest01OCT202333
5L005South4500011.218005MAY2023SouthSouth-L00528000.0045000SOUTHsouth01NOV202332
6L006North9500017.860111JUN2023NorthNorth-L00628183.3395000NORTHnorth01DEC202331
7L007East380009.512002JUL2023EastEast-L00730083.3338000EASTeast01JAN202430
8L008West20000019.272119AUG2023WestWest-L00853333.33200000WESTwest01FEB202429
9L009South6000013.524010SEP2023SouthSouth-L00933750.0060000SOUTHsouth01MAR202428
10L010North8200015.136121OCT2023NorthNorth-L01034394.4482000NORTHnorth01APR202427
11L011East2800010.012011NOV2023EastEast-L01123333.3328000EASTeast01MAY202426
12L012West15000018.460115DEC2023WestWest-L01246000.00150000WESTwest01JUN202425
13L013South5500012.024005JAN2024SouthSouth-L01327500.0055000SOUTHsouth01JUL202424
14L014North9000016.048122FEB2024NorthNorth-L01430000.0090000NORTHnorth01AUG202423
15L015East3500011.018010MAR2024EastEast-L01521388.8935000EASTeast01SEP202422
16L016West18000020.072101APR2024WestWest-L01650000.00180000WESTwest01OCT202421

Used for:

·       Loan aging

·       Review cycles

·       Compliance timelines


6. UTILIZATION CLASSIFICATION MACRO

%macro utilization;

data utilization_flag;

    set loans_dates;

length Utilization $8.;

    if Loan_Amount >= 100000 then Loan_Amount = "High";

    else if Loan_Amount >= 50000 then Utilization = "Medium";

    else Utilization = "Low";

run;

proc print data=utilization_flag;

run;

%mend;


%utilization;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_DateRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_LowerReview_DateLoan_Age_MonthsUtilization
1L001South5000012.524001JAN2023SouthSouth-L00126041.6750000SOUTHsouth01JUL202336Medium
2L002North7500014.236115FEB2023NorthNorth-L00229583.3375000NORTHnorth01AUG202335Medium
3L003East3000010.812010MAR2023EastEast-L00327000.0030000EASTeast01SEP202334Low
4L004West.16.548120APR2023WestWest-L00441250.00120000WESTwest01OCT202333 
5L005South4500011.218005MAY2023SouthSouth-L00528000.0045000SOUTHsouth01NOV202332Low
6L006North9500017.860111JUN2023NorthNorth-L00628183.3395000NORTHnorth01DEC202331Medium
7L007East380009.512002JUL2023EastEast-L00730083.3338000EASTeast01JAN202430Low
8L008West.19.272119AUG2023WestWest-L00853333.33200000WESTwest01FEB202429 
9L009South6000013.524010SEP2023SouthSouth-L00933750.0060000SOUTHsouth01MAR202428Medium
10L010North8200015.136121OCT2023NorthNorth-L01034394.4482000NORTHnorth01APR202427Medium
11L011East2800010.012011NOV2023EastEast-L01123333.3328000EASTeast01MAY202426Low
12L012West.18.460115DEC2023WestWest-L01246000.00150000WESTwest01JUN202425 
13L013South5500012.024005JAN2024SouthSouth-L01327500.0055000SOUTHsouth01JUL202424Medium
14L014North9000016.048122FEB2024NorthNorth-L01430000.0090000NORTHnorth01AUG202423Medium
15L015East3500011.018010MAR2024EastEast-L01521388.8935000EASTeast01SEP202422Low
16L016West.20.072101APR2024WestWest-L01650000.00180000WESTwest01OCT202421 

Used for:

·       Automation

·       Reusability

·       Enterprise scale processing


7. FRAUD DETECTION MACRO

%macro fraud_detection;

data fraud_flag;

    set utilization_flag;

    if Default_Flag=1 and Loan_Amount>100000 and Interest_Rate>15 then Fraud="Yes";

    else Fraud="No";

run;

proc print data=fraud_flag;

run;

%mend;


%fraud_detection;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_DateRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_LowerReview_DateLoan_Age_MonthsUtilizationFraud
1L001South5000012.524001JAN2023SouthSouth-L00126041.6750000SOUTHsouth01JUL202336MediumNo
2L002North7500014.236115FEB2023NorthNorth-L00229583.3375000NORTHnorth01AUG202335MediumNo
3L003East3000010.812010MAR2023EastEast-L00327000.0030000EASTeast01SEP202334LowNo
4L004West.16.548120APR2023WestWest-L00441250.00120000WESTwest01OCT202333 No
5L005South4500011.218005MAY2023SouthSouth-L00528000.0045000SOUTHsouth01NOV202332LowNo
6L006North9500017.860111JUN2023NorthNorth-L00628183.3395000NORTHnorth01DEC202331MediumNo
7L007East380009.512002JUL2023EastEast-L00730083.3338000EASTeast01JAN202430LowNo
8L008West.19.272119AUG2023WestWest-L00853333.33200000WESTwest01FEB202429 No
9L009South6000013.524010SEP2023SouthSouth-L00933750.0060000SOUTHsouth01MAR202428MediumNo
10L010North8200015.136121OCT2023NorthNorth-L01034394.4482000NORTHnorth01APR202427MediumNo
11L011East2800010.012011NOV2023EastEast-L01123333.3328000EASTeast01MAY202426LowNo
12L012West.18.460115DEC2023WestWest-L01246000.00150000WESTwest01JUN202425 No
13L013South5500012.024005JAN2024SouthSouth-L01327500.0055000SOUTHsouth01JUL202424MediumNo
14L014North9000016.048122FEB2024NorthNorth-L01430000.0090000NORTHnorth01AUG202423MediumNo
15L015East3500011.018010MAR2024EastEast-L01521388.8935000EASTeast01SEP202422LowNo
16L016West.20.072101APR2024WestWest-L01650000.00180000WESTwest01OCT202421 No

8. PROC SQL ANALYTICS

proc sql;

    select Region,

           count(*) as Total_Loans,

           avg(Loan_Amount) as Avg_Loan,

           sum(Default_Flag) as Defaults

    from fraud_flag

    group by Region;

quit;

OUTPUT:

RegionTotal_LoansAvg_LoanDefaults
East4327500
North4855004
South4525000
West4.4

Used for:

·       Business aggregation

·       Executive dashboards


9. PROC FREQ

proc freq data=fraud_flag;

    tables Region*Fraud / nocum;

run;

OUTPUT:

The FREQ Procedure

Frequency
Percent
Row Pct
Col Pct
Table of Region by Fraud
RegionFraud
NoTotal
East
4
25.00
100.00
25.00
4
25.00
 
 
North
4
25.00
100.00
25.00
4
25.00
 
 
South
4
25.00
100.00
25.00
4
25.00
 
 
West
4
25.00
100.00
25.00
4
25.00
 
 
Total
16
100.00
16
100.00

Used for:

·       Fraud pattern detection

·       Risk segmentation

10. PROC MEANS

proc means data=fraud_flag mean min max std;

    var Loan_Amount Interest_Rate Risk_Score;

run;

OUTPUT:

The MEANS Procedure

VariableMeanMinimumMaximumStd Dev
Loan_Amount
Interest_Rate
Risk_Score
56916.67
14.2312500
33115.10
28000.00
9.5000000
21388.89
95000.00
20.0000000
53333.33
23554.42
3.4381621
9529.30

Used for:

·       Portfolio health

·       Exposure analysis

11. PROC UNIVARIATE

proc univariate data=fraud_flag;

    var Loan_Amount;

    histogram Loan_Amount;

run;

OUTPUT:

The UNIVARIATE Procedure

Variable: Loan_Amount

Moments
N12Sum Weights12
Mean56916.6667Sum Observations683000
Std Deviation23554.418Variance554810606
Skewness0.41873121Kurtosis-1.2640358
Uncorrected SS4.4977E10Corrected SS6102916667
Coeff Variation41.3840433Std Error Mean6799.57478
Basic Statistical Measures
LocationVariability
Mean56916.67Std Deviation23554
Median52500.00Variance554810606
Mode.Range67000
  Interquartile Range42000
Tests for Location: Mu0=0
TestStatisticp Value
Student's tt8.370621Pr > |t|<.0001
SignM6Pr >= |M|0.0005
Signed RankS39Pr >= |S|0.0005
Quantiles (Definition 5)
LevelQuantile
100% Max95000
99%95000
95%95000
90%90000
75% Q378500
50% Median52500
25% Q136500
10%30000
5%28000
1%28000
0% Min28000
Extreme Observations
LowestHighest
ValueObsValueObs
2800011600009
300003750002
35000158200010
3800079000014
450005950006
Missing Values
Missing
Value
CountPercent Of
All ObsMissing Obs
.425.00100.00

The UNIVARIATE Procedure

Histogram for Loan_Amount

Used for:

·       Outlier detection

·       Distribution analysis

12. PROC CORR

proc corr data=fraud_flag;

    var Loan_Amount Interest_Rate Risk_Score Default_Flag;

run;

OUTPUT:

The CORR Procedure

4 Variables:Loan_Amount Interest_Rate Risk_Score Default_Flag
Simple Statistics
VariableNMeanStd DevSumMinimumMaximum
Loan_Amount1256917235546830002800095000
Interest_Rate1614.231253.43816227.700009.5000020.00000
Risk_Score163311595295298422138953333
Default_Flag160.500000.516408.0000001.00000
Pearson Correlation Coefficients
Prob > |r| under H0: Rho=0
Number of Observations
 Loan_AmountInterest_RateRisk_ScoreDefault_Flag
Loan_Amount
1.00000
 
12
0.96508
<.0001
12
0.57848
0.0488
12
0.89623
<.0001
12
Interest_Rate
0.96508
<.0001
12
1.00000
 
16
0.81914
0.0001
16
0.87677
<.0001
16
Risk_Score
0.57848
0.0488
12
0.81914
0.0001
16
1.00000
 
16
0.64790
0.0066
16
Default_Flag
0.89623
<.0001
12
0.87677
<.0001
16
0.64790
0.0066
16
1.00000
 
16

Used for:

·       Understanding relationships

·       Model building inputs

13. PROC SGPLOT

proc sgplot data=fraud_flag;

    vbar Region / response=Loan_Amount stat=mean;

run;

OUTPUT:

The SGPlot Procedure

Used for:

·       Management visualization

·       KPI dashboards


14. TRANSPOSE, MERGE, APPEND

proc transpose data=fraud_flag out=loan_t;

    var Loan_Amount Interest_Rate;

run;

proc print data=loan_t;

run;

OUTPUT:

Obs_NAME_COL1COL2COL3COL4COL5COL6COL7COL8COL9COL10COL11COL12COL13COL14COL15COL16
1Loan_Amount50000.075000.030000.0.45000.095000.038000.0.60000.082000.028000.550009000035000.
2Interest_Rate12.514.210.816.511.217.89.519.213.515.11018.412161120

proc append base=microfinance_loans 

            data=fraud_flag force;

run;

proc print data=microfinance_loans;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_Date
1L001South5000012.524001JAN2023
2L002North7500014.236115FEB2023
3L003East3000010.812010MAR2023
4L004West12000016.548120APR2023
5L005South4500011.218005MAY2023
6L006North9500017.860111JUN2023
7L007East380009.512002JUL2023
8L008West20000019.272119AUG2023
9L009South6000013.524010SEP2023
10L010North8200015.136121OCT2023
11L011East2800010.012011NOV2023
12L012West15000018.460115DEC2023
13L013South5500012.024005JAN2024
14L014North9000016.048122FEB2024
15L015East3500011.018010MAR2024
16L016West18000020.072101APR2024
17L001South5000012.524001JAN2023
18L002North7500014.236115FEB2023
19L003East3000010.812010MAR2023
20L004West.16.548120APR2023
21L005South4500011.218005MAY2023
22L006North9500017.860111JUN2023
23L007East380009.512002JUL2023
24L008West.19.272119AUG2023
25L009South6000013.524010SEP2023
26L010North8200015.136121OCT2023
27L011East2800010.012011NOV2023
28L012West.18.460115DEC2023
29L013South5500012.024005JAN2024
30L014North9000016.048122FEB2024
31L015East3500011.018010MAR2024
32L016West.20.072101APR2024

Used to add new data into historical tables.


proc sort data=microfinance_loans;by Loan_ID;run;

proc print data=microfinance_loans;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_Date
1L001South5000012.524001JAN2023
2L001South5000012.524001JAN2023
3L002North7500014.236115FEB2023
4L002North7500014.236115FEB2023
5L003East3000010.812010MAR2023
6L003East3000010.812010MAR2023
7L004West12000016.548120APR2023
8L004West.16.548120APR2023
9L005South4500011.218005MAY2023
10L005South4500011.218005MAY2023
11L006North9500017.860111JUN2023
12L006North9500017.860111JUN2023
13L007East380009.512002JUL2023
14L007East380009.512002JUL2023
15L008West20000019.272119AUG2023
16L008West.19.272119AUG2023
17L009South6000013.524010SEP2023
18L009South6000013.524010SEP2023
19L010North8200015.136121OCT2023
20L010North8200015.136121OCT2023
21L011East2800010.012011NOV2023
22L011East2800010.012011NOV2023
23L012West15000018.460115DEC2023
24L012West.18.460115DEC2023
25L013South5500012.024005JAN2024
26L013South5500012.024005JAN2024
27L014North9000016.048122FEB2024
28L014North9000016.048122FEB2024
29L015East3500011.018010MAR2024
30L015East3500011.018010MAR2024
31L016West18000020.072101APR2024
32L016West.20.072101APR2024

proc sort data=fraud_flag;by Loan_ID;run;

proc print data=fraud_flag;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_DateRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_LowerReview_DateLoan_Age_MonthsUtilizationFraud
1L001South5000012.524001JAN2023SouthSouth-L00126041.6750000SOUTHsouth01JUL202336MediumNo
2L002North7500014.236115FEB2023NorthNorth-L00229583.3375000NORTHnorth01AUG202335MediumNo
3L003East3000010.812010MAR2023EastEast-L00327000.0030000EASTeast01SEP202334LowNo
4L004West.16.548120APR2023WestWest-L00441250.00120000WESTwest01OCT202333 No
5L005South4500011.218005MAY2023SouthSouth-L00528000.0045000SOUTHsouth01NOV202332LowNo
6L006North9500017.860111JUN2023NorthNorth-L00628183.3395000NORTHnorth01DEC202331MediumNo
7L007East380009.512002JUL2023EastEast-L00730083.3338000EASTeast01JAN202430LowNo
8L008West.19.272119AUG2023WestWest-L00853333.33200000WESTwest01FEB202429 No
9L009South6000013.524010SEP2023SouthSouth-L00933750.0060000SOUTHsouth01MAR202428MediumNo
10L010North8200015.136121OCT2023NorthNorth-L01034394.4482000NORTHnorth01APR202427MediumNo
11L011East2800010.012011NOV2023EastEast-L01123333.3328000EASTeast01MAY202426LowNo
12L012West.18.460115DEC2023WestWest-L01246000.00150000WESTwest01JUN202425 No
13L013South5500012.024005JAN2024SouthSouth-L01327500.0055000SOUTHsouth01JUL202424MediumNo
14L014North9000016.048122FEB2024NorthNorth-L01430000.0090000NORTHnorth01AUG202423MediumNo
15L015East3500011.018010MAR2024EastEast-L01521388.8935000EASTeast01SEP202422LowNo
16L016West.20.072101APR2024WestWest-L01650000.00180000WESTwest01OCT202421 No

data merged_data;

    merge microfinance_loans

          fraud_flag;

    by Loan_ID;

run;

proc print data=fraud_flag;

run;

OUTPUT:

ObsLoan_IDRegionLoan_AmountInterest_RateRepayment_DurationDefault_FlagLoan_DateRegion_ProperLoan_CategoryRisk_ScoreLoan_Amount_FilledRegion_UpperRegion_LowerReview_DateLoan_Age_MonthsUtilizationFraud
1L001South5000012.524001JAN2023SouthSouth-L00126041.6750000SOUTHsouth01JUL202336MediumNo
2L002North7500014.236115FEB2023NorthNorth-L00229583.3375000NORTHnorth01AUG202335MediumNo
3L003East3000010.812010MAR2023EastEast-L00327000.0030000EASTeast01SEP202334LowNo
4L004West.16.548120APR2023WestWest-L00441250.00120000WESTwest01OCT202333 No
5L005South4500011.218005MAY2023SouthSouth-L00528000.0045000SOUTHsouth01NOV202332LowNo
6L006North9500017.860111JUN2023NorthNorth-L00628183.3395000NORTHnorth01DEC202331MediumNo
7L007East380009.512002JUL2023EastEast-L00730083.3338000EASTeast01JAN202430LowNo
8L008West.19.272119AUG2023WestWest-L00853333.33200000WESTwest01FEB202429 No
9L009South6000013.524010SEP2023SouthSouth-L00933750.0060000SOUTHsouth01MAR202428MediumNo
10L010North8200015.136121OCT2023NorthNorth-L01034394.4482000NORTHnorth01APR202427MediumNo
11L011East2800010.012011NOV2023EastEast-L01123333.3328000EASTeast01MAY202426LowNo
12L012West.18.460115DEC2023WestWest-L01246000.00150000WESTwest01JUN202425 No
13L013South5500012.024005JAN2024SouthSouth-L01327500.0055000SOUTHsouth01JUL202424MediumNo
14L014North9000016.048122FEB2024NorthNorth-L01430000.0090000NORTHnorth01AUG202423MediumNo
15L015East3500011.018010MAR2024EastEast-L01521388.8935000EASTeast01SEP202422LowNo
16L016West.20.072101APR2024WestWest-L01650000.00180000WESTwest01OCT202421 No

Used to combine datasets by key.

15. PROC DATASETS DELETE

proc datasets library=work;

    delete loan_t;

quit;

LOG:

NOTE: Deleting WORK.LOAN_T (memtype=DATA).

Used for:

·       Memory optimization

·       Housekeeping in production


HOW THIS HELPS IN INTERVIEWS

This single project covers:

Topic

Covered

Base SAS

Yes

SQL

Yes

Macros

Yes

Dates

Yes

Statistics

Yes

Business Logic

Yes

Fraud Detection

Yes

Risk Modeling

Yes

Visualization

Yes

Data Engineering

Yes


Conclusion

This project clearly shows how SAS can be used as a powerful business tool, not just a programming language. By using a simple microfinance loan dataset, we were able to simulate real-world problems like loan risk, customer default, and fraud detection.

Through procedures like PROC SQL, PROC MEANS, PROC FREQ, PROC UNIVARIATE, PROC CORR, and PROC SGPLOT, we converted raw loan data into meaningful business insights. The use of macros helped automate complex logic, making the system reusable and scalable for thousands of records in real companies.

In simple words, this project proves that:

·       SAS helps identify risky customers early

·       SAS supports data-driven lending decisions

·       SAS reduces financial loss and fraud

·       SAS improves portfolio performance


INTERVIEW QUESTIONS FOR YOU

·  What is a macro variable?

·  What is the difference between %LET and CALL SYMPUT?

·  What is the difference between SYMGET and SYMPUT?


About the Author:

SAS Learning Hub is a data analytics and SAS programming platform focused on clinical, financial, and real-world data analysis. The content is created by professionals with academic training in Pharmaceutics and hands-on experience in Base SAS, PROC SQL, Macros, SDTM, and ADaM, providing practical and industry-relevant SAS learning resources.


Disclaimer:

The datasets and analysis in this article are created for educational and demonstration purposes only. They do not represent Microfinanace Loan data.


Our Mission:

This blog provides industry-focused SAS programming tutorials and analytics projects covering finance, healthcare, and technology.


This project is suitable for:

·  Students learning SAS

·  Data analysts building portfolios

·  Professionals preparing for SAS interviews

·  Bloggers writing about analytics and smart cities

·  EV and energy industry professionals


Follow Us On : 


 


--->Follow our blog for more SAS-based analytics projects and industry data models.

---> Support Us By Following Our Blog..

To deepen your understanding of SAS analytics, please refer to our other data science and industry-focused projects listed below:





Comments

Popular posts from this blog

409.Can We Build a Reliable Emergency Services Analytics & Fraud Detection System in SAS While Identifying and Fixing Intentional Errors?

397.If a satellite has excellent signal strength but very high latency, can it still deliver good quality communication? Why or why not?A Sas Study

401.How Efficient Are Global Data Centers? A Complete SAS Analytics Study