I need to create a credit scorecard model. Once I ran a logistic regression to find out the probability of default of a customer, how do I calculate scores of new customers? I have variables like age, debt to income ratio, amount of credit card debt, etc.


You need to take the logistic coefficients, take their natural log to get back to the index function scale from the odds ratio scale, and multiply them by the values of the covariates, sum the products, and evaluate the cumulative logistic distribution with mean 0 and standard deviation $\frac{\pi}{\sqrt{3}}$ of that sum.

Here's an example in Stata for one observation. First we fit the model:

. sysuse auto, clear
(1978 Automobile Data)

. logistic foreign mpg weight

Logistic regression                             Number of obs     =         74
                                                LR chi2(2)        =      35.72
                                                Prob > chi2       =     0.0000
Log likelihood = -27.175156                     Pseudo R2         =     0.3966

     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
         mpg |   .8448578   .0776572    -1.83   0.067     .7055753    1.011635
      weight |   .9961009   .0010077    -3.86   0.000     .9941279    .9980779
       _cons |   898396.7    4059594     3.03   0.002     127.9781    6.31e+09

Let's predict $\Pr(foreign=1)$ for the estimation sample:

. predict phat
(option pr assumed; Pr(foreign))

Let's peek at the first observation:

. list mpg foreign phat mpg weight in 1, clean noobs

    mpg    foreign       phat   mpg   weight  
     22   Domestic   .1904363    22    2,930  

Let's match that by hand:

. display logistic(ln(898396.7) + ln(.8448578)*22 + ln(.9961009)*2930)

You can see that the manual predicted probability matches the the output of Stata's predict command (the phat variable I defined) pretty closely.

| cite | improve this answer | |

You can't, really.

Logistic regression is typically intended to model discrete outcomes, like being dead or alive, sick or well, or account in good standing/default. You, however, want to predict a continuous value (in [280, 850] or [501, 990] or whatever).

You could get the probability of default out of a logistic regression model, but that alone is typically just one component of a credit score. You could potentially plug that value, along with other predictors, into a regression model to predict a credit score.

Strictly speaking, I'm not even sure if credit scoring systems are actually regression models. There may just be some proprietary algorithm that combines the information to produce a single value using ad-hoc weights.

| cite | improve this answer | |
  • 5
    $\begingroup$ The output from a logistic regression doesn't have to be discrete: the model gives a probability in [0, 1]. You could simply define a person's credit score to be that probability... $\endgroup$ – Adrian Jun 3 '15 at 18:15
  • $\begingroup$ ...and possibly scale it to live in [200,900], if that's desired. $\endgroup$ – Adrian Jun 3 '15 at 18:17
  • $\begingroup$ True, that was pretty sloppy (edited to fix). Still, I think credit scores are a bit more than P(default) * scale $\endgroup$ – Matt Krause Jun 3 '15 at 18:32
  • 2
    $\begingroup$ I think the claim that logistic regression is classification and not regression is overstated - to the point of being a mischaracterization. It's perfectly possible (e.g. in an experiment), for example, to have a set of binomial responses at each value of x, and the model for the mean (as for a binomial response) is simply for $p$, the proportion of successes at each $x$. Meanwhile $p$ might remain - for every $x$ under consideration - between 0.25 and 0.4, say. Where's the classification in this model for a binomial proportion? $\endgroup$ – Glen_b Jun 4 '15 at 2:54
  • $\begingroup$ @Glen_b, I suppose that's fair. However, wouldn't you agree that logistic regression is not going to produce an arbitrary continuous value on its own? $\endgroup$ – Matt Krause Jun 5 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.