calculate.glla {doremi} | R Documentation |
calculate.glla
estimates the derivatives of a variable using the Generalized Local Linear Approximation (GLLA) method
described in doi: 10.4324/9780203864746Boker et al.(2010).
This method estimates the derivatives over a number of measurement points called the embedding number assuming an equally spaced time series.
calculate.glla(signal, time, embedding = 3, n = 2)
signal |
is the input vector containing the data from which the derivatives are estimated. |
time |
is a vector containing the time values corresponding to the signal. Arguments signal and time must have the same length. |
embedding |
is an integer indicating the embedding dimension, that is the number of points to consider for derivative calculation. Embedding must be at least #' 2 for the calculation of the first derivative (first order models) and at least 3 for the calculation of the second derivative (second order models). |
n |
is the maximum order of the derivative to calculate |
Returns a list containing three columns:
dtime- contains the time values in which the derivative was calculated. That is, the moving average of the input time over embedding points.
dsignal- is a data.frame containing n+1 columns and the same number of rows as the signal. The column k is the k-1 order derivative of the signal over embedding points.
embedding- number of points used for the derivative calculation.
n - the maximum derivative order calculated n
#In the following example the derivatives for the function y(t) = t^2 are calculated.
#The expected results are:
#y'(t) = 2t and y''(t) = 2
time <- c(1:500)/100
signal <- time^2
result <- calculate.glla(signal = signal, time = time, embedding = 5)