compDeriv {GPoM} | R Documentation |
Computes the successive derivatives of a time series
Description
Computes the successive derivatives from one single time series, with the Savitzky-Golay approach (1964).
Usage
compDeriv(TS, nDrv, tstep, winL = 9)
Arguments
TS |
A single time series provided as a single vector. |
nDrv |
The number of derivatives to be computed from the input
|
tstep |
Sampling Time of the input time series |
winL |
The local window length used for computing the derivatives [1-2]. |
Value
drv A matrix containing the original variable (smoothed by the
filtering process) in the first comlumn and its nDrv
+1 first derivatives
in the next columns (note that winL
values of the original time series
will be lost both at the begining and the end of the time series due to boundary
effect).
Author(s)
Sylvain Mangiarotti
References
[1] Savitzky, A.; Golay, M.J.E.,
Smoothing and Differentiation of Data by Simplified Least Squares Procedures.
Analytical Chemistry 36 (8), 1627-1639, 1964.
[2] Steinier J., Termonia Y., Deltour, J.
Comments on smoothing and differentiation of data by simplified least square procedure.
Analytical Chemistry 44 (11): 1906-1909, 1972.
See Also
Examples
# load data:
data(NDVI)
# Compute the derivatives:
drv <- compDeriv(NDVI[,1], nDrv = 3, tstep = 1/125)