If each level of one categorical variable belongs to exactly one level of another, indicators for the coarser levels are sums of indicators for the finer levels. Including unrestricted fixed effects for both therefore gives a rank-deficient ordinary least squares: the separate effects lack identifiability without additional constraints.
The violated assumption is independence of random variables across observations: repeated measurements on the same rat form clustered data. A persistent rat-specific weight difference induces positive within-rat covariance, even after adjustment for time and diet. Treating all 176 measurements as independent is pseudoreplication.
For the claimed lack of identifiability in the second fit, Rat must be a categorical variable, as intended by the rat-effect interpretation. Each rat receives only one diet, so this is confounding of nested fixed factors. If is the rat-indicator column, the diet- indicator is . Thus a diet effect can be increased by and every corresponding rat effect decreased by , leaving all fitted values unchanged. With an intercept, two diet columns, fifteen rat contrasts and time, there are 19 columns but only 17 independent columns: the intercept and rat contrasts already span the diet columns, while time varies within rats. This gives rank-deficient ordinary least squares.
The first model ignores within-rat dependence; the second cannot separate unrestricted fixed diet and rat effects. If Rat were instead encoded as a single numeric predictor, the asserted rank deficiency would not follow merely from nesting.
The Gaussian likelihood is proportional to
so maximum likelihood estimation is equivalent to ordinary least squares. If and has rank , then is invertible and the normal equations give
If , then and . A least-squares minimizer always exists, but it is not unique: by rank-deficient ordinary least squares, the complete set is
an affine subspace of dimension . Thus there are uncountably infinitely many likelihood maximizers. In the generic full-row-rank case their dimension is .