1
$\begingroup$

If I model glm2.out <- with(D1train, glm(non_def ~ loan_amnt + grade + emp_length_p + term + state_woe, family=binomial("logit"))) Where non_def is a column of values with $1$ if I do not default on a loan, and $0$ if I do default.

The question is, does a higher score indicate a greater association with defaulting or non-defaulting?

$\endgroup$
6
  • $\begingroup$ What do you mean by "higher score"? $\endgroup$
    – Noah
    Nov 30, 2022 at 15:49
  • $\begingroup$ @Noah a higher log-odds, essentially when I use the binomial("logit") keyword does it model $log(\frac{P(Y=0)}{P(Y=1)})$ or the other way round? $\endgroup$
    – Governor
    Nov 30, 2022 at 15:54
  • 1
    $\begingroup$ If your outcome is a 0/1 variable, it models $\text{logit}(P(Y=1)) = \text{log}\left(\frac{P(Y=1)}{P(Y=0)}\right)$. So a high value of the linear predictor corresponds to a higher predicted probability, and positive coefficients correspond to effects that increase the probability of the outcome. $\endgroup$
    – Noah
    Nov 30, 2022 at 16:07
  • 1
    $\begingroup$ Well, in your example the outcome variable is coded in a somewhat unusual way. Usually 1 is associated with with the positive outcome (positive as in the event happening, e.g., defaulting) and 0 with the negative outcome (negative as in the thing not happening, e.g., not defaulting), which is the opposite to how you coded it. So if you want to interpret your coefficients as affecting the probability of defaulting (e.g., to target high risk applicants), you might want to switch the labels, just to ease the interpretation (the model fit won't change). $\endgroup$
    – Noah
    Nov 30, 2022 at 16:16
  • 1
    $\begingroup$ @Noah I want to have higher log-odds score meaning a better applicant i.e. higher score for less risky applicants $\endgroup$
    – Governor
    Nov 30, 2022 at 16:18

1 Answer 1

1
$\begingroup$

Your coding of your outcome variable is unorthodox. Most would code defaulting with $1$ rather than with $0$. Since you have non-defaulting as $1$, the mode is predicting the log-odds of non-default.

$$ \log\left( \dfrac{ \hat p_{non-default} }{ 1-\hat p_{non-default} } \right)=X\hat \beta $$

The log-odds function and its inverse are strictly increasing functions of the probability of non-default. Consequently, increasing the $X\hat\beta$ linear predictor increases the estimated probability of non-default.

$\endgroup$
2
  • $\begingroup$ Yeah I see what you mean, but the relationship in general is that I want a higher score to indicate a better applicant, thus I should keep it the same? $\endgroup$
    – Governor
    Nov 30, 2022 at 16:19
  • 1
    $\begingroup$ @Master That’s fine! You have a reasonable justification for your unorthodox choice that works for your task. $\endgroup$
    – Dave
    Nov 30, 2022 at 16:21

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.