The HPDMDB Procedure

Getting Started: HPDMDB Procedure

The HPDMDB procedure summarizes data. The following example uses the Sampsio.Hmeq data set, which includes information about 5,960 fictitious mortgages. Each case represents an applicant for a home equity loan, and all applicants have an existing mortgage. The binary target variable BAD indicates whether an applicant eventually defaulted or was ever seriously delinquent. There are 10 numeric input variables and three classification input variables.

 proc hpdmdb data=Sampsio.Hmeq 
     classout=cout varout=vout;

     var loan derog mortdue value yoj delinq 
         clage ninq clno debtinc;
     class bad(desc) reason(ascending) job;
 run;

 proc print data=cout;run;
 proc print data=vout;run;

The data set cout (shown in Figure 5.1) contains the class summary table with levels sorted according to the sort option in the CLASS statement of PROC HPDMDB. You can see that the levels for BAD are in descending order and the levels for REASON are in ascending order. The levels for JOB are in the default ascending order.

Figure 5.1: Summaries of Classification Variables in Sampsio.Hmeq Data Set

The HPDMDB Procedure

Performance Information
Execution Mode Single-Machine
Number of Threads 4

Obs NAME LEVEL CODE FREQUENCY TYPE CRAW NRAW FREQPERCENT NMISSPERCENT
1 BAD 1 1 1189 N   1 19.9497 19.9497
2 BAD 0 0 4771 N   0 80.0503 80.0503
3 REASON   0 252 C   . 4.2282 .
4 REASON DEBTCON 1 3928 C DebtCon . 65.9060 68.8157
5 REASON HOMEIMP 2 1780 C HomeImp . 29.8658 31.1843
6 JOB   0 279 C   . 4.6812 .
7 JOB MGR 1 767 C Mgr . 12.8691 13.5011
8 JOB OFFICE 2 948 C Office . 15.9060 16.6872
9 JOB OTHER 3 2388 C Other . 40.0671 42.0349
10 JOB PROFEXE 4 1276 C ProfExe . 21.4094 22.4608
11 JOB SALES 5 109 C Sales . 1.8289 1.9187
12 JOB SELF 6 193 C Self . 3.2383 3.3973

Obs NAME NMISS N MIN MAX MEAN STD SKEWNESS KURTOSIS SUM USS CSS
1 LOAN 0 5960 1100.00 89900.00 18607.97 11207.48 2.02378 6.9326 110903500.00 2.8121848E12 748495791434.56
2 DEROG 708 5252 0.00 10.00 0.25 0.85 5.32087 36.8728 1337.00 4099.00 3758.64
3 MORTDUE 518 5442 2063.00 399550.00 73760.82 44457.61 1.81448 6.4819 401406367.20 4.0362084E13 10754022449877
4 VALUE 112 5848 8000.00 855909.00 101776.05 57385.78 3.05334 24.3628 595186333.04 7.9830628E13 19254914800672
5 YOJ 515 5445 0.00 41.00 8.92 7.57 0.98846 0.3721 48581.75 745755.59 312296.19
6 DELINQ 580 5380 0.00 15.00 0.45 1.13 4.02315 23.5654 2418.00 7922.00 6835.25
7 CLAGE 308 5652 0.00 1168.23 179.77 85.81 1.34341 7.5995 1016038.99 224259958.52 41610414.32
8 NINQ 510 5450 0.00 17.00 1.19 1.73 2.62198 9.7865 6464.00 23950.00 16283.34
9 CLNO 222 5738 0.00 71.00 21.30 10.14 0.77505 1.1577 122197.00 3192071.00 589751.93
10 DEBTINC 1267 4693 0.52 203.31 33.78 8.60 2.85235 50.5040 158529.14 5702262.28 347161.26


Numeric summaries are in the data set vout, shown in Figure 5.2.

Figure 5.2: Summaries of Numeric Variables in Sampsio.Hmeq Data Set

The HPDMDB Procedure

Performance Information
Execution Mode Single-Machine
Number of Threads 4

Obs NAME LEVEL CODE FREQUENCY TYPE CRAW NRAW FREQPERCENT NMISSPERCENT
1 BAD 1 1 1189 N   1 19.9497 19.9497
2 BAD 0 0 4771 N   0 80.0503 80.0503
3 REASON   0 252 C   . 4.2282 .
4 REASON DEBTCON 1 3928 C DebtCon . 65.9060 68.8157
5 REASON HOMEIMP 2 1780 C HomeImp . 29.8658 31.1843
6 JOB   0 279 C   . 4.6812 .
7 JOB MGR 1 767 C Mgr . 12.8691 13.5011
8 JOB OFFICE 2 948 C Office . 15.9060 16.6872
9 JOB OTHER 3 2388 C Other . 40.0671 42.0349
10 JOB PROFEXE 4 1276 C ProfExe . 21.4094 22.4608
11 JOB SALES 5 109 C Sales . 1.8289 1.9187
12 JOB SELF 6 193 C Self . 3.2383 3.3973

Obs NAME NMISS N MIN MAX MEAN STD SKEWNESS KURTOSIS SUM USS CSS
1 LOAN 0 5960 1100.00 89900.00 18607.97 11207.48 2.02378 6.9326 110903500.00 2.8121848E12 748495791434.56
2 DEROG 708 5252 0.00 10.00 0.25 0.85 5.32087 36.8728 1337.00 4099.00 3758.64
3 MORTDUE 518 5442 2063.00 399550.00 73760.82 44457.61 1.81448 6.4819 401406367.20 4.0362084E13 10754022449877
4 VALUE 112 5848 8000.00 855909.00 101776.05 57385.78 3.05334 24.3628 595186333.04 7.9830628E13 19254914800672
5 YOJ 515 5445 0.00 41.00 8.92 7.57 0.98846 0.3721 48581.75 745755.59 312296.19
6 DELINQ 580 5380 0.00 15.00 0.45 1.13 4.02315 23.5654 2418.00 7922.00 6835.25
7 CLAGE 308 5652 0.00 1168.23 179.77 85.81 1.34341 7.5995 1016038.99 224259958.52 41610414.32
8 NINQ 510 5450 0.00 17.00 1.19 1.73 2.62198 9.7865 6464.00 23950.00 16283.34
9 CLNO 222 5738 0.00 71.00 21.30 10.14 0.77505 1.1577 122197.00 3192071.00 589751.93
10 DEBTINC 1267 4693 0.52 203.31 33.78 8.60 2.85235 50.5040 158529.14 5702262.28 347161.26