I am running a logistic regression model in r programming and wanted to know the goodness of fit of it since the command does not give out the f-test value as in the linear regression models.
So I used the following command:
summary( glm( vomiting ~ age, family = binomial(link = logit) ) ) # Call: # glm(formula = vomiting ~ age, family = binomial(link = logit)) # Deviance Residuals: # Min 1Q Median 3Q Max # -1.0671 -1.0174 -0.9365 1.3395 1.9196 # Coefficients: # Estimate Std. Error z value Pr(>|z|) # (Intercept) -0.141729 0.106206 -1.334 0.182 # age -0.015437 0.003965 -3.893 9.89e-05 *** # --- # Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' # (Dispersion parameter for binomial family taken to be 1 # Null deviance: 1452.3 on 1093 degrees of freedom # Residual deviance: 1433.9 on 1092 degrees of freedom # AIC: 1437.9 # Number of Fisher Scoring iterations: 4
Then I run the following which I got some idea from someone else and get:
1-pchisq(1452.3-1433.9, 1093-1092) #  1.79058e-05
May I know in detail what the null hypothesis and alternative hypothesis are and what this 1.79058e-05 value means in this case?