基於貝葉斯判別的房地產信用評級研究
本文首先采用Logistic回歸法篩選出4個財務指標作為評價函數的計量參數,
再構造Bayes判別算法建立信用評估模型,
將其應用於某些房地產企業的實際數據分析,並評估其評判效果。
程序代碼
data LOGIT;input g x1-x10 @@ ; /* 輸入數據和對應的變量名稱,指定數據是按順序對應變量(@@) */
cards;
1 76.02 112.16 52.65 16.24 4.17 88.54 -1.93 98.07 -58.63 -1.93
1 50.15 53.55 6.18 5.81 0.77 6.91 5.89 105.89 18.21 5.89
1 35.94 8.04 0.25 12.89 0.04 11.54 0.25 100.25 3.56 0.25
2 36.03 65.44 5.07 4.71 0.77 -4.21 2.42 102.42 47.27 2.42
2 76.95 86.32 -6.38 14.28 -0.51 101.50 -6.18 93.82 34.19 -6.18
2 36.36 37.91 6.01 10.78 0.87 -11.03 6.20 106.20 43.43 6.20
2 45.44 46.41 -1.09 14.04 -0.14 82.45 130.53 230.53 -82.56 130.53
2 48.80 43.19 6.97 11.15 0.94 20.58 8.62 108.62 7.67 8.62
2 21.09 45.85 6.10 13.79 0.00 32.70 6.86 106.86 -91.48 6.86
2 26.38 1.14 16.25 7.98 2.26 -31.83 15.26 115.26 63.42 15.26
2 32.61 26.18 8.51 22.08 1.45 10.71 8.89 108.89 6.14 8.89
2 25.16 57.63 20.94 23.88 3.44 -0.98 30.46 130.46 60.45 30.46
2 48.47 39.56 8.23 10.76 1.06 7.67 8.56 108.56 45.65 8.56
3 52.05 75.95 24.12 13.18 2.50 -7.47 24.90 124.90 18.17 24.90
3 86.92 14.00 4.55 10.96 0.38 -23.56 -79.83 20.17 36.01 -79.83
3 39.96 41.87 7.10 12.04 -0.12 8.20 3.24 103.24 5.98 3.24
1 65.00 29.00 1.50 2.00 0.16 54.55 -0.63 99.37 -58.34 -0.63
2 66.20 30.52 21.51 23.18 1.77 16.29 23.42 123.42 31.15 23.42
…… ……
;
proc logistic data=LOGIT des; /* 選擇Logistic回歸模型對這個數據進行分析,對因變量設置des概率 */
model g=x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 /selection=stepwise slentry=0.15 slstay=0.15; /* 指定因變量和自變量,
逐步選擇變量,設置stepwise顯著性水平0.15*/
run;
輸出結果
SAS 系統 2012年05月26日星期六 下午12時31分22秒 1
The LOGISTIC Procedure
Model Information
Data Set WORK.LOGIT
Response Variable g
Number of Response Levels 3
Model cumulative logit
Optimization Technique Fisher's scoring
Number of Observations Read 48
Number of Observations Used 48
Response Profile
Ordered Total
Value g Frequency
1 3 13
2 2 31
3 1 4
Probabilities modeled are cumulated over the lower Ordered Values.
Stepwise Selection Procedure
Step 0. Intercepts entered:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
-2 Log L = 80.949
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
13.0922 8 0.1087
NOTE: No (additional) effects met the 0.05 significance level for entry into the model.
Analysis of Maximum Likelihood Estimates
Standard Wald
Parameter DF Estimate Error Chi-Square Pr > ChiSq
Intercept 3 1 -0.9904 0.3248 9.2980 0.0023
Intercept 2 1 2.3979 0.5222 21.0830 <.0001
SAS 系統 2012年05月26日 星期六 下午12時31分22秒 2
The LOGISTIC Procedure
Model Information
Data Set WORK.LOGIT
Response Variable g
Number of Response Levels 3
Model cumulative logit
Optimization Technique Fisher's scoring
Number of Observations Read 48
Number of Observations Used 48
Response Profile
Ordered Total
Value g Frequency
1 3 13
2 2 31
3 1 4
Probabilities modeled are cumulated over the lower Ordered Values.
Stepwise Selection Procedure
Step 0. Intercepts entered:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
-2 Log L = 80.949
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
13.0922 8 0.1087
Step 1. Effect x4 entered:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Score Test for the Proportional Odds Assumption
Chi-Square DF Pr > ChiSq
4.7698 1 0.0290
SAS 系統 2012年05月26日 星期六 下午12時31分22秒 3
The LOGISTIC Procedure
Model Fit Statistics
Intercept
Intercept and
Criterion Only Covariates
AIC 84.949 83.246
SC 88.691 88.859
-2 Log L 80.949 77.246
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 3.7032 1 0.0543
Score 3.7112 1 0.0540
Wald 3.2133 1 0.0730
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
10.0282 7 0.1870
NOTE: No effects for the model in Step 1 are removed.
Step 2. Effect x6 entered:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Score Test for the Proportional Odds Assumption
Chi-Square DF Pr > ChiSq
5.0078 2 0.0818
Model Fit Statistics
Intercept
Intercept and
Criterion Only Covariates
AIC 84.949 81.703
SC 88.691 89.187
-2 Log L 80.949 73.703
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 7.2465 2 0.0267
Score 6.9374 2 0.0312
Wald 6.1144 2 0.0470
SAS 系統 2012年05月26日 星期六 下午12時31分22秒 4
The LOGISTIC Procedure
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
7.4184 6 0.2839
NOTE: No effects for the model in Step 2 are removed.
Step 3. Effect x5 entered:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Score Test for the Proportional Odds Assumption
Chi-Square DF Pr > ChiSq
6.0306 3 0.1101
Model Fit Statistics
Intercept
Intercept and
Criterion Only Covariates
AIC 84.949 80.027
SC 88.691 89.383
-2 Log L 80.949 70.027
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 10.9224 3 0.0122
Score 9.5728 3 0.0226
Wald 8.8338 3 0.0316
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
3.7605 5 0.5844
Step 4. Effect x4 is removed:
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Score Test for the Proportional Odds Assumption
Chi-Square DF Pr > ChiSq
1.4638 2 0.4810
SAS 系統 2012年05月26日 星期六 下午12時31分22秒 5
The LOGISTIC Procedure
Model Fit Statistics
Intercept
Intercept and
Criterion Only Covariates
AIC 84.949 78.987
SC 88.691 86.471
-2 Log L 80.949 70.987
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 9.9625 2 0.0069
Score 8.5919 2 0.0136
Wald 8.0936 2 0.0175
Residual Chi-Square Test
Chi-Square DF Pr > ChiSq
4.6568 6 0.5885
NOTE: No effects for the model in Step 4 are removed.
NOTE: No (additional) effects met the 0.15 significance level for entry into the model.
Summary of Stepwise Selection
Effect Number Score Wald
Step Entered Removed DF In Chi-Square Chi-Square Pr > ChiSq
1 x4 1 1 3.7112 0.0540
2 x6 1 2 3.3464 0.0674
3 x5 1 3 3.6124 0.0573
4 x4 1 2 0.9037 0.3418
Analysis of Maximum Likelihood Estimates
Standard Wald
Parameter DF Estimate Error Chi-Square Pr > ChiSq
Intercept 3 1 -0.2253 0.4165 0.2927 0.5885
Intercept 2 1 3.7752 0.8090 21.7733 <.0001
x5 1 -0.7061 0.2951 5.7259 0.0167
x6 1 -0.0203 0.00878 5.3502 0.0207
Odds Ratio Estimates
Point 95% Wald
Effect Estimate Confidence Limits
x5 0.494 0.277 0.880
x6 0.980 0.963 0.997
SAS 系統 2012年05月26日 星期六 下午12時31分22秒 6
The LOGISTIC Procedure
Association of Predicted Probabilities and Observed Responses
Percent Concordant 72.7 Somers' D 0.459
Percent Discordant 26.8 Gamma 0.462
Percent Tied 0.5 Tau-a 0.236
Pairs 579 c 0.730