Evaluates the fitted values (i.e. evaluates the surface at the original data points) for a Locfit object. This function works by reconstructing the model matrix from the original formula, and predicting at those points. The function may be fooled; for example, if the original data frame has changed since the fit, or if the model formula includes calls to random number generators.
# S3 method for locfit
fitted(object, data=NULL, what="coef", cv=FALSE,
studentize=FALSE, type="fit", tr, ...)
A numeric vector of the fitted values.
"locfit"
object.
The data frame for the original fit. Usually, this shouldn't be needed, especially when the function is called directly. It may be needed when called inside another function.
What to compute fitted values of. The default, what="coef"
, works
with the fitted curve itself. Other choices include "nlx"
for the
length of the weight diagram; "infl"
for the influence function;
"band"
for the bandwidth; "degr"
for the local polynomial
degree; "lik"
for the maximized local likelihood; "rdf"
for the local residual degrees of freedom and "vari"
for the
variance function. The interpolation algorithm for some of these quantities
is questionable.
If TRUE
, leave-one-out cross validated fitted values are approximated.
Won't make much sense, unless what="coef"
.
If TRUE
, residuals are studentized.
Type of fit or residuals to compute. The default is "fit"
for
fitted.locfit
, and "dev"
for residuals.locfit
.
Other choices include "pear"
for Pearson residuals; "raw"
for raw residuals, "ldot"
for likelihood derivative;
"d2"
for the deviance residual squared; lddot
for the
likelihood second derivative. Generally, type
should only be
used when what="coef"
.
Back transformation for likelihood models.
arguments passed to and from methods.
locfit
,
predict.locfit
,
residuals.locfit