control
argument of
loess
.
loess.control(surface=c("interpolate", "direct"), statistics= c("approximate", "exact"), trace.hat=c("wait.to.decide", "approximate", "exact"), cell=0.2, iterations=4, method=c("loess", "model.frame"), ...)
"direct"
) or whether an interpolation method is
used (
"interpolate"
). The latter, the default, is what most
users should use unless special circumstances warrant.
"exact"
)
or approximately (
"approximate"
). The latter is the default. The former
should only be used for testing the approximation in statistical development
and is not meant for routine usage because computation time can be
horrendous.
surface
is
"approximate"
,
determines the computational method used to compute the trace of the hat
matrix, which is used in the computation of the statistical quantities.
If
"exact"
, an exact computation is done; normally this goes quite
fast on the fastest machines until n, the number of observations is
1000 or more, but for very slow machines, things can slow down at n = 300.
If
"wait.to.decide"
is selected, then a default is chosen in
loess
;
the default is
"exact"
for n < 500 and
"approximate"
otherwise.
If
surface
is
"exact"
, an exact computation is always done for the
trace.
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
.
family
is
"symmetric"
, the number of iterations of
the robust fitting method.
"loess"
, the default,
the loess object is returned. If
"model.frame"
, the model frame
is returned.
surface
.
statistics
.
trace.hat
.
cell
.
iterations
.
method
.
This function can be used to create a list that is given as the
value of the argument
control
of the function
loess
.
Most users need not specify
control
since its defaults provide satisfactory performance
in most cases. Changing the surface evaluation method
to
exact
can increase the computational burden
slightly for small data sets and by a substantial
amount for large data sets. Changing the method
of computing statistics to
exact
can cause
a catastrophic computation time except perhaps
in supercomputer environments. The arguments of
loess.control
can
be specified directly in a call to
loess
for a temporary
change in the computational methods. The user, however, can
achieve a lasting change by rewriting
loess.control
with new defaults.
loess(NOx ~ C * E, data = ethanol, span = 1/2, drop.square = "C", parametric = "C", control = loess.control(surface = "direct")) # The following has the same result: loess(NOx ~ C * E, data = ethanol, span = 1/2, drop.square = "C", parametric = "C", surface = "direct")