0

I have plotted the decision boundary: Decision boundary for my logistic regression but I don't clearly understand how to interpret it. How do I know on which side of the boundary y=1 and on which y=0?

Here is my code:

model <- glm (left ~ satisfaction_level + time_spend_company, family = binomial(link = 'logit'), data = data)
coefs = coef(model)
summary(model)

(x = c(min(data[,1])-2,  max(data[,1])+2))
(y = c((-1/coefs[3]) * (coefs[2] * x + coefs[1])))
lines(x, y, col="black", lwd=2)

Can someone explain?

Thanks!

P.S. I have use the Kaggle HR data set with split:

data <- HR.2 [1:12000,]
test.data <- HR.2 [12001:14999,]
N_D_
  • 1
  • 2
  • 1
    If you would supply some data, maybe a subset of yours for example, for people to use, it might help someone run through your example. It's generally good form to have a 0,0 origin in a plot. – shea Jul 19 '17 at 15:42
  • Interpretation of statistical models is not on-topic for Stack Overflow. If you have questions about statistical models, you should ask at [stats.se] instead. Questions here should include [reproducible examples](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data. – MrFlick Jul 19 '17 at 15:57
  • Hi @shea, I have added the data set used for the regression in the post. – N_D_ Jul 19 '17 at 16:03

0 Answers0