plot {features}R Documentation

Plotting the smoothed fucntion and its derivatives.

Description

Plots of the smoothed function and its first 2 derivatives.

Usage

## S3 method for class 'features'
plot(x, ...)

Arguments

x

an object of class(features) that is returned by the features() function.

...

Additional arguments to be passed to the plot() function

Value

A plot is shown in a 2 x 2 layout, where the top 2 frames are the same and they depict the raw data and the smoothed function. The bottom left panel shows the smoothed first derivative, and the bottom right panel depicts the smoothed second derivative.

Examples

# 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)
plot(ans)

ans.sm <- features(x, y, smoother="smooth.spline")
plot(ans.sm)


[Package features version 2015.12-1 Index]