I understand that you have to run the resulting regression line through the logistic function to get the predicted probability:
am.glm <- glm(am ~ hp + wt, data=mtcars, family=binomial) newdata <- data.frame(hp=120, wt=2.8) p1 <- predict(am.glm, newdata, type="response") p2 <- 1/(1+exp(-(am.glm$coefficients + am.glm$coefficients*newdata[1,1] + am.glm$coefficients*newdata[1,2]))) p1 - p2 ## 1 ## 1.110223e-16
Now I want to build two scoring model with the aim in mind to be usable with a hand calculator only:
- First model: I want to just take the two variables ($hp$, $wt$), multiply them by some factor and add them. The resulting number should be compared to a threshold number which then gives me the decision.
- Second model: I want to have certain ranges of the two variables. Depending on the range the variable falls into I am given a number. At the end I simply add all numbers to arrive at my threshold number which again gives me the decision.
As an example from the area of credit scoring where these scorecards are used quite heavily (source: https://www.eflglobal.com/insights-sbbns-credit-risk-problem-loan-management-workshop/):
How to go about and esp. how to transform the logistic regression coefficients to be able to build the two (or any of the two) models?
Perhaps you can even demonstrate the steps in R, making use of the above
mtcars logistic regression.