In the context of a generalized linear model I have heard three different amounts of parameters which belong to a saturated model:
- The number of observations
- The number of unique predictor observations
- The number of unique linear predictors $\beta_1 X_1 + \ldots + \beta_p X_p$
I am considering a binary response variable $Y \in \lbrace 0,1 \rbrace$ and I am interested in fitting logistic regression models with respect to categorical predictors. Now I am wondering how to properly calculate the deviance if multiple data points share the same predictor values (but not necessarily the same response). So for example the three data points $$(Y=0, X_1 = 1, X_2 = 0, X_3 = 1) \\ (Y=1, X_1 = 1, X_2 = 0, X_3 = 1) \\ (Y=1, X_1 = 1, X_2 = 0, X_3 = 1)$$ could belong to my data set.
If the first case would be true, then the fitted log likelihood of the saturated would be equal to 0. In the second case however, there would be a parameter for each unique predictor setting which would lead to the log likelihood of the saturated model not being 0 if the response takes different values for such a setting.
So which of the three amounts is correct?