I am doing an ordinary least squares regression (in python with statsmodels) using a categorical variable as a predictor. There are 5 values that the categorical variable can have. However, after running the regression, the output only includes 4 of them.
Here is what I am running:
>>> from statsmodels.formula.api import ols
>>> model = ols("normalized_score ~ C(general_subreddit)", data=df_feature)
>>> results = model.fit()
>>> results.summary()
The output of the last command includes the following rows in the table:
I can check the count of each of the categorical variables as follows:
>>> from collections import Counter
>>> Counter(df_feature["general_subreddit"])
Counter({nan: 20,
'community': 4159,
'ending_addiction': 3819,
'mental_health': 4650,
'other': 6920,
'relationships': 4318})
Ignoring the NaNs, why does the categorical value of "community" not appear in the model summary?