@kkbrum suggests
lines 32 and 33 in lmrob_methods.R here should invoke stats::naresid like in the xmat call; otherwise line 36 fails.
xmat <- stats::model.matrix(x)
xmat <- stats::naresid(x$na.action, xmat)
psi <- chi <- ctrl$psi
stopifnot(is.numeric(c.chi <- ctrl$tuning.chi),
is.numeric(c.psi <- ctrl$tuning.psi))
r0 <- x$init$resid
r <- x$residuals
This seems right to me. We should verify by filling out the tests/testthat/test.lmrob_methods.R tests to include some fitting the lmrob using na.action = na.exclude. The conjecture is that this won't work with the code as is, but should work after the sugested substitutions.
@kkbrum suggests
This seems right to me. We should verify by filling out the tests/testthat/test.lmrob_methods.R tests to include some fitting the lmrob using
na.action = na.exclude. The conjecture is that this won't work with the code as is, but should work after the sugested substitutions.