Having performanced a logistic regression in R with the glm function, I'm not sure how to interpret the results for the Intercept (as shown below).
So I found that my intercept is significant but all the predictors coefficients was non significant, May I consider that the intercept significance give us any inference about the relationship between variables?
Call: glm(formula = Sales~ Service, family = binomial, data = train)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4337 -1.4337 0.9411 0.9411 0.9411
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.5849 0.1998 2.927 0.00342 **
Service2 -17.1510 1696.7344 -0.010 0.99193
Service3 15.9811 2399.5447 0.007 0.99469
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 147.13 on 111 degrees of freedom
Residual deviance: 142.17 on 109 degrees of freedom AIC: 148.17
Number of Fisher Scoring iterations: 15
I decided to perform the Hypothesis Test on the same data and I found that there is a relationship between the two variables, then I can reject the null hypothesis H0 because the p-value is less than small threshold (0,05).
Welch Two Sample t-test
data: sales and service
t = -9.6086, df = 215.53, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.4820527 -0.3179473
sample estimates:
mean of x mean of y
0.63125 1.03125
If There is a relationship between the variables why when I use gml function in my model the dependent variables return insignificant?
Additional: My dataset
Service
Sales 1 2 3
0 56 3 0
1 100 0 1