Skip to content
Prev 13601 / 398502 Next

predictions under NA

If fitting by lm (and glm, at least), na.action=na.exclude will
do what you want.  It keeps enough track of modifications to make 2)
correct.  Some other fitting procedures (in MASS, for example) do use 1).

na.exclude is fairly new (1.3.0), but it is on the help page for na.omit.

You do need to use the proper extractor functions: you should not use
fit$fitted.values but fitted(fit) or predicted(fit), except perhaps when
writing R internals.
On Mon, 17 Sep 2001, Christian Hoffmann wrote: