Hi. I am trying to understand credit scoring with the scorecard package. The package converts independent variables into weight of evidence bins, and calculates a baseline score and individual variable scores for each observation. My question is how does it create a baseline score, especially since at this point I have not calculated probabilities for each observer. Thank you.
Thank you Nirgraharnuk. You are correct. It seems the algorithm fit a GLM without my telling it do so, presumably in the scorecard2 command? I assume it used some default values. I need those default values, and the GLM intercept. But now that I know what the algorithm did, I can recreate the baseline score:
dt_woe_train = woebin_ply(train, bins) # creates data table with woe values
dt_woe_test = woebin_ply(test, bins)
model3 <- glm(creditability ~ ., family = binomial(), data = dt_woe_train) # these are WOE vars
s <- summary(model3)
b0 <- s$coefficients[1,1] # fitted intercept