supsmu
Scatter Plot Smoothing Using Super Smoother

### Description

Returns a list containing x and y components that are a smooth of the input data. This algorithm is designed to be fast, and by default uses cross validation to pick the span.

### Usage

    supsmu(x, y, wt = rep(1, n), span = "cv", periodic = FALSE, bass = 0)

### Arguments

x | vector of abscissa values for the scatter plot. Missing values (NAs) are allowed.
y | vector of ordinate values for the scatter plot. Missing values (NAs) are allowed.
wt | vector of weights for each (x,y) observation, n is the length of y. Missing values (NAs) are allowed.
span | fraction of observations in the smoothing window. If span="cv", then automatic (variable) span selection is done by means of cross validation.
periodic | if TRUE, the smoother assumes x is a periodic variable with values in the range [0.0, 1.0] and period 1.0. An error occurs if x has values outside this range.
bass | controls high frequency (small span) penalty used with automatic span selection (bass tone control). Values of bass less than 0 or greater than 10 have no effect.

Value
a list with the following components:

x | the sorted input x vector with duplicate points removed.
y | the smoothed y vector corresponding to the output x.

Side Effects
a warning is issued if there were NAs and/or Infs in the input x, y or wt. Such observations are dropped from the computations.
Background
The supsmu function serves a purpose similar to that of the function lowess. supsmu is much faster although it does not have the robustness properties of lowess. For small samples (n<40), or if there are substantial serial correlations between observations close in x-value, a pre-specified fixed span smoother (span > 0) should be used. Reasonable span values are from 0.3 to 0.5.
References
Friedman, J. H. 1984. A Variable Span Scatterplot Smoother. Palo Alto, CA: Laboratory for Computational Statistics, Stanford University. Technical Report No. 5.
Friedman, J. H. 1984. SMART User's Guide. Palo Alto, CA: Laboratory for Computational Statistics, Stanford University. Technical Report No. 1.
See Also
ksmooth, loess, lowess, scatter.smooth
Examples

    smoxy <- with(Sdatasets::fuel.frame, supsmu(Weight, Mileage))

Package stats version 6.1.5-18
Package Index