There is an error in glm when aliased or colinear variables are
introduced so that the matrix is singular. The variable names do not
correspond to the coefficients estimated. This is because the variable
names are updated at every iteration instead of only once. The
following four lines in glm.fit
if(fit$rank != nvars){
...
...
}
(plus the comment lines) should be moved down outside the iteration
loop, that is just before
if(!conv)
This procedure moves the aliased parameters to the end of the list and
leaves them with zero estimates. This is not compatible with lm which
leaves them in place but gives them NAs. I prefer the glm solution.
Jim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

