naresid(omit, x, …)
napredict(omit, x, …)
na.action
function,
typically the "na.action"
attribute of the result of
na.omit
or na.exclude
.x
.predict
,
fitted
and residuals
methods for modelling
functions to compensate for the removal of NA
s in the fitting
process. They are used by the default, "lm"
, "glm"
and
"nls"
methods, and by further methods in packages https://CRAN.R-project.org/package=MASS,
https://CRAN.R-project.org/package=rpart and https://CRAN.R-project.org/package=survival. Also used for the scores returned by
factanal
, prcomp
and princomp
. The default methods do nothing. The default method for the na.exclude
action is to pad the object with NA
s in the correct positions to
have the same number of rows as the original data frame. Currently naresid
and napredict
are identical, but
future methods need not be. naresid
is used for residuals, and
napredict
for fitted values, predictions and weights
.