Skip to content

Predicted values from glm() when linear predictor is NA.

1 message · John Fox

#
Dear Jeff,

I'm not sure that pursuing this further is sensible, since I don't think 
that we disagree about anything of consequence, but I'll take one more 
crack at explaining why I think lm()'s behaviour is reasonable, if not 
the only approach:
On 2022-07-28 12:50 p.m., Jeff Newmiller wrote:
But the model is "solved" by reducing the columns of the model matrix to 
a linearly independent set, providing a basis for the column space of 
the original rank-deficient model matrix.
One could do newdata %*% coef(model, complete=FALSE).
There are advantages and disadvantages to reducing the model matrix to 
full column rank. The strategy you advocate -- to retain the 
deficient-rank model matrix but constrain the coefficients by setting 
one arbitrarily to 0 -- is coherent, and is similar, if I remember 
right, to what's implemented in the linear model procedure in SAS. This 
is really six of one and a half-dozen of the other.

Best,
John