loess.control
Computational Options for Loess Fitting

Description

Specifies computational options used within the control argument of loess.

Usage

loess.control(surface = c("interpolate", "direct"), statistics =
    c("approximate", "exact"), trace.hat = c("exact", "approximate"),
    cell = 0.2, iterations = 4, ...) 

Arguments

surface determines how the fitted surface is computed.
  • "interpolate" (the default) specifies that the fitted surface is computed using an interpolation method. Use "interpolate" unless special circumstances warrant.
  • "direct" specifies that the fitted surface is computed directly at all points.
statistics determines how the statistical quantities are computed.
  • "approximate" (the default) specifies an approximate computation.
  • "exact" specifies an exact computation. Use only for testing the approximation in statistical development. It is not meant for routine usage because computation time can be horrendous.
trace.hat
  • If statistics 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 statistics is "exact", an exact computation is done. Normally this computation is quite fast on the fastest machines until n, the number of observations, is 1000 or more, but for very slow machines, computation can slow at n = 300.
The default is "exact" for n < 500 and "approximate" otherwise. If statistics is "exact", an exact computation is always done for the trace.
cell if surface is specified as interpolate, cell specifies the maximum cell size of the k-d tree. For example, 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 the family argument of loess is "symmetric", the number of iterations of the robust fitting method.

Details

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 because its defaults provide satisfactory performance in most cases. The arguments of loess.control can be specified directly in a call to loess for a temporary change in the computational methods. However, you can achieve a lasting change by rewriting loess.control with new defaults.
Value
returns a list with the following components:
surface the value of the argument surface.
statistics the value of the argument statistics.
trace.hat the value of the argument trace.hat.
cell the value of the argument cell.
iterations the value of the argument iterations.
See Also
loess
Examples
loess(ozone ~ radiation, Sdatasets::air, span = 1/2, drop.square = "C", 
      parametric = "C", control = loess.control(surface = "direct")) 
# The following has the same result: 
loess(ozone ~ radiation, Sdatasets::air, span = 1/2, drop.square = "C", 
      parametric = "C", surface = "direct") 
Package stats version 6.1.4-13
Package Index