Learn R Programming

EGAnet (version 0.9.6)

glla: Generalized Local Linear Approximation

Description

Estimates the derivatives of a time series using generalized local linear approximation (GLLA). GLLA is a filtering method for estimating derivatives from data that uses time delay embedding and a variant of Savitzky-Golay filtering to accomplish the task.

Usage

glla(x, n.embed, tau, delta, order)

Arguments

x

Vector. An observed time series.

n.embed

Integer. Number of embedded dimensions (the number of observations to be used in the Embed function).

tau

Integer. Number of observations to offset successive embeddings in the Embed function. A tau of one uses adjacent observations. Default is "tau = 1".

delta

Integer. The time between successive observations in the time series. Default is "delta = 1".

order

Integer. The maximum order of the derivative to be estimated. For example, "order = 2" will return a matrix with three columns with the estimates of the observed scores and the first and second derivative for each row of the embedded matrix (i.e. the reorganization of the time series implemented via the Embed function).

Value

Returns a matrix containing n columns, in which n is one plus the maximum order of the derivatives to be estimated via generalized local linear approximation.

References

Boker, S. M., Deboeck, P. R., Edler, C., & Keel, P. K. (2010) Generalized local linear approximation of derivatives from time series. In S.-M. Chow, E. Ferrer, & F. Hsieh (Eds.), The Notre Dame series on quantitative methodology. Statistical methods for modeling human dynamics: An interdisciplinary dialogue, (p. 161<U+2013>178). Routledge/Taylor & Francis Group. doi:10.1037/a0016622

Deboeck, P. R., Montpetit, M. A., Bergeman, C. S., & Boker, S. M. (2009) Using derivative estimates to describe intraindividual variability at multiple time scales. Psychological Methods, 14(4), 367-386. doi:10.1037/a0016622

Savitzky, A., & Golay, M. J. (1964). Smoothing and differentiation of data by simplified least squares procedures. Analytical Chemistry, 36(8), 1627-1639. doi:10.1021/ac60214a047

Examples

Run this code
# NOT RUN {
# A time series with 8 time points
tseries <- 49:56
deriv.tseries <- glla(tseries, n.embed = 4, tau = 1, delta = 1, order = 2)


# }

Run the code above in your browser using DataLab