Skip to content
Prev 1778 / 398506 Next

Error messages

Lorenz Gygax <lgygax at access.unizh.ch> writes:
Well, one of the things that R does not have is a centralised database
of error messages. *Next* time one invents a statistical programming
language, perhaps this would be something to consider...

Anyways, the error here means that a .Fortran or .C call had missing
values in one of the arguments. Probably in lm.influence's

    .Fortran("lminfl", lm.obj$qr$qr, n, n, k, lm.obj$qr$qraux, 
        lm.obj$coefficients, e, hat = double(n), coefficients = matrix(0, 
            nr = n, nc = k), sigma = double(n), DUP = FALSE)

the 6th arg of "lminfl" would be lm.obj$coefficients, so I suspect
your guess is correct when you say that singularities could be the
problem.

Take a look at help(traceback) and help(debug) to see how to find the
source of error messages.

[I seem to recall that there's a reason why lm.fit sticks in NA
(rather than zero) for undetermined coefficients, but I can't offhand
remember it. I suppose that lm.influence() would make sense even for
singular designs, so the current behaviour is likely a bug, not a
feature]