I have factor dependent variable and many independent variables(continuous & discrete). This is about financial risk modelling. Whether a customer is likely to default the loan or not is the dependent variable and the principle, interest, high/low/medium income, etc are few out of many independent variables. I would like to see which hypothesis testing is best for this scenario.

My objective is to identify significant independent variables impacting the y.

I think multinomial logistic regression is good for such scenario but regression is modelling. I only want to understand which x's significantly impact the y. Suggesions will be appreciated.


1 Answer 1


Generating random data for R, where default is 1 when the customer defaults the loan, the interest rate is having an effect on that but not the level of income (3 levels, 1=low revenues like me, 2=medium revenues, 3=high revenues):


Building a glm of family "binomial"


The summary command gives you p-values for each of the continuous variables and for the levels of the categorical variables. If you include more than one categorical variable, this may get hard to interpret and you will probably have to use pairwise comparisons with the function emmeans() from the package of the same name in R.

> summary(model1)

glm(formula = default ~ interestrate + levelincome, family = "binomial", 
    data = df)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.9572  -0.9737   0.4031   0.9128   2.1725  

             Estimate Std. Error z value Pr(>|z|)   
(Intercept)   1.84354    0.90072   2.047  0.04068 * 
interestrate -0.19427    0.06354  -3.058  0.00223 **
levelincome1 -1.13407    0.92109  -1.231  0.21824   
levelincome2 -0.80197    0.93582  -0.857  0.39146   
levelincome3 -1.17280    1.20936  -0.970  0.33216   
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 83.111  on 59  degrees of freedom
Residual deviance: 69.605  on 55  degrees of freedom
AIC: 79.605

Number of Fisher Scoring iterations: 3

Note that we indeed find an effect for the interest rate and none for the level of income, which does match the simulated data.

  • $\begingroup$ Please consider accepting the answer if this resolved your issue. You can use the + / - system on the top left of answers to indicate whether or not you found an answer useful. $\endgroup$
    – Nakx
    Jan 20, 2018 at 23:58

Your Answer

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

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