The deviance residual of a GLM model is defined to be:
$2 (log L_{Saturated Model} - log L_{GLM Model})$
where Saturated model is the model that has as many parameter as the number of data points.
As given a dataset, there are many saturated models.
For example, given the dataset with 5 data points of the variables $Y, X_1, X_2, X_3$ (where $X_i$ are the independent variables) and the saturated model should have the form (assume the log function):
$log(Y) = coef_1 * a_1 + coef_2 * a_2 +...+ coef_5 * a_5$
We can choose different combination of $X_1, X_2, X_3$ for the representation of $a_i$ (for example, $a_1 = X_1/X_2$ or $a_2 = (X_1+X_2)$) until we have 5 different combinations to fill in these $a_i$ in the equation.
However, when I run a GLM regression in R, the result gives a unique deviance residual of the model.
I would like to have 2 questions:
When there are many saturated model, which saturated model is chosen to calculate the deviance residual ?
Is there anything that assures that the log likelihood of all the saturated model the same (in order to have a unique deviance residual) ?
Thank you very much for your help!