Learn R Programming

rpatrec (version 1.0.1)

savgolay: Perform Savitzgy-Golay smoothing on Time Series Data

Description

Use this function to smooth your time series data using local polynomial regression, as first pouplarised by Savitzky and Golay (1964).

Usage

savgolay(input, width = 4, degree = 2)

Arguments

input
Input Vector with Time Series Data
width
Width of the filter (to each side of the centre)
degree
Highest degree polynomial

Value

Vector containing smoothed time series data.

Details

For an overview of the package capabilities, click here rpatrec. See the report for detailed references

Examples

Run this code
savgolay(input=c(1,6,2,46,23,1,2,13,23,35,23,-2,3,23))
## Not run: ------------------------------------
# #create a standard HS pattern:
# a <- generator()
# #add noise to this patterns
# b <- noise(a,'white',10)
# #smooth to regain the signal
# c <- savgolay(b,8,2)
## ---------------------------------------------


Run the code above in your browser using DataLab