1
$\begingroup$

I am reading a book, which states how to calculate the Score function from the prediction of the glm() function of R.

The statement goes as below -

Our aim is to define a new scale with anchor set at 660 points and log-odds doubling each 40 points. A 72:1 odds ratio is identified in line with credit bureau common practice.

And finally they define the score function as -

scaled_score <- function(logit, odds, offset = 500, pdo = 20)
{
b = pdo/log(2)
a = offset - b*log(odds)
round(a + b*log((1-logit)/logit))
}

It appears that :

logit -> the prediction from the glm() function in R using predict() function

odds -> 72 (hard-coded)

I failed to understand what is the exact purpose of this scaled_score() function? Why they define the scaled_score() in the above way i.e. what do the variables a,b etc. signify?

Any insight will be very appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$

The terms $a$ and $b$ are derived by solving a system of equations. For example, if 20 points doubles the odds and the base score is 660, then you can set up two equations. See this question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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