This is almost a FAQ and asked many times on this site! The short answer is that for a categorical variable ("factor" in R-speak) with $k$ levels and $k-1$ degrees of freedom, one cannot estimate one "effect" for each of the $k$ levels, since the space generated by the factor has only dimension (that is, degrees of freedom $k-1$). There are many ways to parametrize the space, but the most usual one is to choose one reference level and measure the effect of each of the other levels by its differential effects as compared to the reference.
When that is done, we can say that the effect of the reference level itself is zero, so its coefficient is zero, with a standard error of zero, as there is no sampling variability in a constant value.
Software should help users by including that in the summary output table, as below, where I take the example used at Values of reference categories for main and interaction effects using lm() in R and edit in three lines for the three reference levels:
Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 21.500 3.349 6.421 1.22e-06 ***
as.factor(cyl)4 0 0 NA NA
as.factor(cyl)6 -1.750 4.101 -0.427 0.6734
as.factor(cyl)8 -6.450 3.485 -1.851 0.0766
as.factor(gear)3 0 0 NA NA
as.factor(gear)4 5.425 3.552 1.527 0.1397
as.factor(gear)5 6.700 4.101 1.634 0.1154
as.factor(cyl)4:as.factor(gear)3 0 0 NA NA
as.factor(cyl)6:as.factor(gear)4 -5.425 4.585 -1.183 0.2483
as.factor(cyl)8:as.factor(gear)4 NA NA NA NA
as.factor(cyl)6:as.factor(gear)5 -6.750 5.800 -1.164 0.2559
as.factor(cyl)8:as.factor(gear)5 -6.350 4.833 -1.314 0.2013
The three reference levels in this example is as.factor(cyl)4
, as.factor(gear)3
and for the interaction as.factor(cyl)4:as.factor(gear)3
. The values in the last two columns is NA
, (Not Available), since a value there does not give any meaning, it is not defined. It does not give meaning to test a value that is zero by definition!
Many users lives would have been simplified if the report was written this way!
Other posts treating this is among others
Edit
There is an R package that can (among a lot of other goodies ...) make regression output tables including lines for the reference levels of factors. That is package gtsummary
with function tbl_regression
. For some examples see https://stackoverflow.com/questions/67225238/is-there-a-way-to-change-in-referent-category-in-the-gtsummary-to-ref-or-a