You can't compare model1
with 0.5
This is model1 structure:
model1
Call: glm(formula = id ~ speed + dist, family = "binomial", data = cars)
Coefficients:
(Intercept) speed dist
-1158.863 73.588 1.366
Degrees of Freedom: 49 Total (i.e. Null); 47 Residual
Null Deviance: 69.31
Residual Deviance: 2.932e-08 AIC: 6
You have to pass new data to the model and than compare the prediction (using function predict
) value with 0.5
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…