How do I interpret the output of glm in R?

I'm very new to R and get some trouble to interpret. Here is the code

Crabs <- read.table("http://www.stat.ufl.edu/~aa/cat/data/Crabs.dat",
fit <- glm(y ~ width + factor(color), family = binomial, data = Crabs)
summary(fit)


And the output is

Call:
glm(formula = y ~ width + factor(color), family = binomial, data = Crabs)

Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.1124  -0.9848   0.5243   0.8513   2.1413

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)    -11.38519    2.87346  -3.962 7.43e-05 ***
width            0.46796    0.10554   4.434 9.26e-06 ***
factor(color)2   0.07242    0.73989   0.098    0.922
factor(color)3  -0.22380    0.77708  -0.288    0.773
factor(color)4  -1.32992    0.85252  -1.560    0.119
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 225.76  on 172  degrees of freedom
Residual deviance: 187.46  on 168  degrees of freedom
AIC: 197.46

Number of Fisher Scoring iterations: 4


Q1: In sector 'Coefficients:' there is no 'factor(color)1' but others. Why?

Q2: What's the difference between 'Null deviance' and 'Residual deviance'

Q3: What does 'AIC' mean?

• AIC is short for Akaike information criterion (Google is your friend). Null/residual deviance are explained in many different places (again, Google is your friend). Color 1 is the reference category, the estimates for color 2/3/4 are in relation to this category. Jun 1, 2021 at 12:46
• Jun 1, 2021 at 15:25
• Absolutely no offense to the poster but this is what happens when you don't have a degree in Mathematics and trying to mess around with the global "machine learning" and "data science" trend. Jun 2, 2021 at 12:49

Q1: In sector 'Coefficients:' there is no 'factor(color)1' but others. Why?

Because it is included in the intercept. It's similar to a situation where you have a continuous variable - the intercept is the expected value when the variable is zero. With categorical variables we call the level which is included in the intercept the "reference level" and the estimates for the other levels are the expected difference in the response between the reference level and the estimated level

Q2: What's the difference between 'Null deviance' and 'Residual deviance'

Null deviance relates to a model with no explanatory variables whereas the residual deviance is for the model that you fitted.

Q3: What does 'AIC' mean?

AIC stands for Akaike Information Criterion. It is a measure of goodness of fit.