a formula object, with the response on the left of
a ~ operator, and the terms, separated by "*" operators, on
the right.
object
an object that inherits from class
loess.
loessobj
an object that inherits from class
loess.
OPTIONAL ARGUMENTS:
data
a data frame in which to interpret the variables named in
formula, or in the
subset and the
weights argument.
If this is missing, then the variables in the formula should be on the
search list.
weights
optional expression for weights to be given to indi-
vidual observations in the sum of squared residuals that
forms the local fitting criterion. By default, an un-
weighted fit is carried out. If supplied, weights is
treated as an expression to be evaluated in the same data
frame as the model formula. It should evaluate to a non-
negative numeric vector. If the different observations
have nonequal variances, weights should be inversely pro-
portional to the variances.
subset
expression saying which subset of the rows of the data
should be used in the fit.
This can be a logical vector (which is replicated to have length equal
to the number of observations), or a numeric vector indicating which
observation numbers are to be included, or a character vector of the
row names to be included.
All observations are included by default.
family
the assumed distribution of the errors. The values are
"gaussian" or "symmetric". The first value is the default.
If the second value is specified, a robust fitting
procedure is used.
normalize
logical that determines if numeric predictors
should be normalized. If TRUE, the standard
normalization is used. If FALSE, no normalization is carried out.
span
smoothing parameter between 0 to 1, the higher the smoother the
fitted cured.
enp.target
another way to specify the amount of smoothing.
An approximation is used to compute a value of span that
will yield approximately enp.target equivalent number of
parameters.
degree.p
if FALSE, use
locally-linear fitting, and if TRUE, use locally-quadratic fitting.
drop.quad
for cases with degree.p=TRUE and with two or
more numeric predictors, this argument specifies those
numeric predictors whose squares should be dropped from
the set of fitting variables.
The argument is a
character string quoted with predictor names. Predictors are pasted
together with comma as separator, sep=",".
cond.parametric
for two or more numeric predictors, this argument
specifies those variables that should be
conditionally-parametric.
The argument is a
character string quoted with predictor names. Predictors are pasted
together with comma as separator, sep=",".
na.omit.p
if
TRUE, then any observation with missing values are removed
from the analysis.
If
FALSE and there are missing values then the function will exit
with a message that missing values are not allowed.
If
na.omit.p is
TRUE then
na.action is set to
na.omit in the
call to
lm.
If
na.omit.p is
FALSE then
na.action is set to
na.fail in the
call to
lm.
surface
determines whether the fitted surface is computed
directly at all points ("direct") or whether an
interpolation method is used ("interpolate"). The latter,
the default, is what most users should use unless special
circumstances warrant.
cell
if interpolation is used to compute the surface, this
argument specifies the maximum cell size of the k-d tree.
Suppose k <- floor(n*cell*span) where n is the number of
observations. Then a cell is further divided if the
number of observations within it is greater than or equal
to k.
iterations
if family is "symmetric", the number of iterations
of the robust fitting method.
print.object.p
if
TRUE, a short analysis of variance table is printed.
This output is from the function
print.aov.
save.results
a character string for the name of the data frame to save the
fit and residuals in.
If data frame with this name already exists in database 1 and it has the
appropriate number of rows then the saved values will be appended
to the data frame.
If the object already exist in database 1 and it is not a data frame
or it does not have the appropriate number of rows then a new name
is created by appending a number to
save.results and the results are
saved in the data frame with the new name.
save.fitted.p
if
TRUE, the fitted values from the regression are saved in the
data frame
save.results.
save.resid.p
if
TRUE, the residuals from the regression are saved in the
data frame
save.results.
plotResidVsFit.p
if
TRUE, a plot of the residuals versus the fitted values is created.
plotSqrtAbsResid.p
if
TRUE, a plot of the absolute value of the square root of the
residuals versus the fitted values is created.
This plot is useful for checking for the constant variance assumption
of the model.
plotResponseVsFit.p
if
TRUE, a plot of the response versus the fitted values is created.
plotQQ.p
if
TRUE, a Normal quantile-quantile plot of the residuals is created.
plotRFSpread.p
if
TRUE, a residual-fit spread plot is created.
This is a visual analog to the multiple R-squared statistic.
It compares the spread of the fitted values to the spread of the residuals.
plotCoplot.p
if TRUE, the function graphs the fitted surface of a local
regression model for one, two or three predictors.
For one predictor, a curve is graphed against the predictor. For
two or three predictors, a conditioning plot (coplot) is made against each
predictor, conditional on the others. Each dependence
panel of a conditioning plot shows a curve that is a slice through
the surface and is based on an evaluation for evaluation
equally-spaced values of the predictor ranging between
values specified by ranges; in addition, confidence
intervals at confidence equally-spaced values over the same
range are shown. These arguments are specified during the
creation of the preplot object by preplot.loess().
smooths
if
TRUE a smooth curve, computed with
loess.smooth
is displayed on the Residuals vs Fit,
Sqrt Abs Residuals vs Fit and Response vs Fit plots.
rugplot.p
if
TRUE, a rugplot is displayed on the Residuals vs Fit,
Sqrt Abs Residuals vs Fit and Response vs Fit plots.
A rugplot is a sequence of vertical bars along the x-axis that mark the
"observed" x values.
id.n
the number of extreme points that will be identified on the
Residuals vs Fit, Sqrt Abs Residuals vs Fit, Residual's Normal QQ
and Cook
s Distance plots. The row names from the models data frame
will be used to identify the points.
newdata
a data frame to use for computing predictions.
It must contain the same names as the terms in the right side of the
formula for the model.
If missing, the predictions for the original data are computed.
predobj
a character string for the name of the data frame to save the
predictions, standard errors and confidence intervals in.
If data frame with this name already exists in database 1 and it has the
appropriate number of rows then the values will be appended
to the data frame.
If the object already exist in database 1 and it is not a data frame
or it does not have the appropriate number of rows then a new name
is created by appending a number to
predobj and the values are
saved in data frame with the new name.
predict.p
if
TRUE, the predicted values are saved in
predobj.
se.p
if
TRUE, the pointwise standard errors for the predictions will be
stored in
predobj.
VALUE:
an object of class
"loess".
See the help file for
loess.object for details.
SIDE EFFECTS:
Plots will be drawn if requested.
The objects
save.results will be created or appended
to if fitted values or residuals are saved.