Like predict
, its default predictions from a glm
are on
the scale of the linear predictor, not the scale of the response; see
Rosenbaum \ Rubin (1985). (This default can
be overridden by specifying type="response"
.)
In contrast to predict
, if scores
isn't given an explicit
newdata
argument then it attempts to reconstruct one from the context
in which it is called, rather than from its first argument. For example, if
it's called within the formula
argument of a call to glm
, its
newdata
is the same data frame that glm
evaluates that formula
in, as opposed to the model frame associated with object
. See
Examples.
The handling of missing independent variables also differs from that of
predict
in two ways. First, if the data used to generate object
has NA
values, they're mean-imputed using
fill.NAs
. Secondly, if newdata
(either the explicit
argument, or the implicit data generated from object
) has NA
values, they're likewise mean-imputed using fill.NAs
. Also,
missingness flags are added to the formula of object
, which is then
re-fit, using fill.NAs
, prior to calling predict
.
If newdata
is specified and contains no missing data, scores
returns the same value as predict
.