features(x, y, smoother=c("glkerns", "smooth.spline"), fits.return=TRUE,
control = list(), ...)
bandwidth
that controls the smoothness of the fit. See the help for `glkerns' for mode details.features
when fits.return=TRUE
. A list with 4 vectors: abscissae, smoothed function, first derivative, and second derivativecontrol
is a list specifing any changes to default values of control parameters. Note that the names of these must be specified completely. Partial matching will not work. Default values of control
are: ctrl <- list(npts=100, c.outlier=3, decim.out=2)
npts
: an integer. Number of points to use in estimating smoothed function and for computing features
c.outlier
: a constant denoting number of standard deviations away from smooth fit for determining whether a point is an outlier. Default is 3.
decim.out
: number of decimals to display in the features output.
fget
, plot.features
, plot
, glkerns
, smooth.spline
# Estimating the smooth and the derivatives of a noisy and discretely sampled function.
n <- 200
x <- sort(runif(n))
y <- exp(-0.2 * sin(2*pi*x)) + rnorm(n, sd=0.05)
ans <- features(x, y)
fget(ans)
Run the code above in your browser using DataLab