Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I am using PROC LOGISTIC along with Class statements to do binary logit model(default=1,non-default=0) on a bank loan dataset where I have 7 numeric independent variables and 1 categorical independent variable.

Hosmer and Lemeshow test yields a p = 0.6757, and Percent Concordant = 73.3 so the model is fine I think.

To my dismay Gini is coming up as 0.2305, and ks is only 35.1.

I there any way I can do anything about the results or am I missing anything?

%let Keepvar= Age_in_years Level_of_education Years_with_Current_Employer 
   Years_at_Current_Address Household_income_in_thousands Debt_to_income_ratio 
   Credit_card_debt__in_thousands Other_debt_in__in_thousands; 
PROC LOGISTIC DATA = work.bankloan descending outest=estimates;
    class Level_of_education (ref='1') / param=ref;
    MODEL Defaulted = &keepvar/selection=backword rsquare lackfit;
RUN;

%macro rankorder(data=, est=, dependent= );
    proc score data = &data score = &est out = mlscore type = parms;
    var &keepvar;
run;

data mlscore;
    set mlscore;
    prob = exp(&dependent.2) /(1+exp(&dependent.2));
run;

proc rank data = mlscore out = mlrankscore groups =10;
    var prob;
    ranks probrank;
run;

proc sql;
select probrank, avg(prob) as probability, count(*) as total,avg(&dependent) as 
  Act_Avg_Response, sum(&dependent) as sum_of_response from mlrankscore group by 
  probrank order by probrank descending;
quit;
%mend;
%rankorder(data=bankloan, est=estimates, dependent=Defaulted);
share|improve this question
1  
Can you show your code? However, the HL test and the GINI test are for different things. HL is a test of goodness of fit of the model, GINI is a test of how much the model improves your prediction of the DV. KS usually stands for Kolmoogorov Smirnov and I am not sure what you are using it for, here. – Peter Flom Sep 9 '12 at 11:47
I am trying a decile analysis; The maximum difference across that 10 buckets is called the KS value – purnendumaity Sep 9 '12 at 21:18
%let Keepvar= Age_in_years Level_of_education Years_with_Current_Employer Years_at_Current_Address Household_income_in_thousands Debt_to_income_ratio Credit_card_debt__in_thousands Other_debt_in__in_thousands ; PROC LOGISTIC DATA = work.bankloan descending outest=estimates; class Level_of_education (ref='1') / param=ref ; MODEL Defaulted = &keepvar/selection=backword rsquare lackfit; RUN; – purnendumaity Sep 9 '12 at 21:22
%macro rankorder(data=, est=, dependent= ); proc score data = &data score = &est out = mlscore type = parms; var &keepvar; run; data mlscore; set mlscore; prob = exp(&dependent.2) /(1+exp(&dependent.2)); run; proc rank data = mlscore out = mlrankscore groups =10; var prob; ranks probrank; run; proc sql; select probrank, avg(prob) as probability, count(*) as total,avg(&dependent) as Act_Avg_Response, sum(&dependent) as sum_of_response from mlrankscore group by probrank order by probrank descending; quit; %mend; %rankorder(data=bankloan, est=estimates, dependent=Defaulted); – purnendumaity Sep 9 '12 at 21:24
May I get your email then I can send you the whole code...actually after this there is another big macro for calculating Gini, KS etc. – purnendumaity Sep 9 '12 at 21:26
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.