This is an all-in-one function. It provides, at the same time, the delayed-coordinate embedding vector (embedding
), estimates the best neural net model (netfit
), calculates the partial derivatives directly from the chosen neural network model (javcobian.net
). Finally, this function estimates both the largest Lyapunov exponent through the Norma-2 procedure (lyapunov.max
) and the Lyapunov exponent spectrum through the QR decomposition procedure (lyapunov.spec
) taking into account the full sample and three different methods of subsampling by blocks.
lyapunov(
data,
m = 1:4,
lag = 1:1,
timelapse = c("FIXED", "VARIABLE"),
h = 2:10,
w0maxit = 100,
wtsmaxit = 1e+06,
pre.white = TRUE,
lyapmethod = c("SLE", "LLE", "ALL"),
blocking = c("BOOT", "NOVER", "EQS", "FULL", "ALL"),
B = 1000,
trace = 1,
seed.t = TRUE,
seed = 56666459,
doplot = TRUE
)
This function returns several objects considering the parameter set selected by the user. The largest Lyapunov exponent (Norma-2 procedure) and the Lyapunov exponent spectrum (QR decomposition procedure) by each blocking method are estimated. It also contains some useful information about the estimated jacobian, the best-fitted feed-forward single hidden layer neural net model, the best set of weights found, the fitted values, the residuals obtained, the best embedding parameters set chosen, the sample size or the block length considered by each blocking method. This function provides the standard error, the z test value and the p-value for testing the null hypothesis \(H0: \lambda_k > 0 for k = 1,2,3, \ldots, m\). Reject the null hypothesis $H_0$ means lack of chaotic behaviour. That is, the data-generating process does not have a chaotic attractor because of it does not show the property of sensitivity to initial conditions.
a vector
, a time-series object ts
or xts
, a data.frame
, a data.table
or a matrix
depending on the method selected in timelapse
.
a non-negative integer denoting a lower and upper bound for the embedding dimension (Default 1:4).
a non-negative integer denoting a lower and upper bound for the the reconstruction delay (Default 1:1).
a character denoting if the time-series data are sampled at uniform time-frequency e.g., 1-month, 1-day, 1-hour, 30-min, 5-min, 1-min and so on FIXED
or non-uniform time-frequency which are not equally spaced in time VARIABLE
(Default FIXED
).
a non-negative integer denoting a lower and upper bound for the number of neurones (or nodes) in the single hidden layer (Default 2:10).
a non-negative integer denoting the maximum iterations to estimate the initial parameter vector of the neural net models (Default 100).
a non-negative integer denoting the maximum iterations to estimate the weights parameter vector of the neural net models (Default 1e6).
a logical value denoting if the user wants to use as points to evaluate the partial derivatives the delayed vectors filtered by the neural net model chosen TRUE
or not FALSE
(Default TRUE
).
a character denoting the procedure chosen to estimate the Lyapunov exponent. If LLE
has been selected the function will estimate only the largest Lyapunov exponent through the Norma-2 method. If SLE
has been selected the function will estimate the Lyapunov exponent spectrum through the QR decomposition. Otherwise ALL
has to be specified. In this case the function will estimate the Lyapunov exponent considering both procedures (Default SLE
).
a character denoting the blocking method chosen for figuring out the Lyapunov exponent. Available options are FULL
if the user considers the full sample, NOVER
if the user considers the non-overlapping sample, EQS
if the user considers the equally spaced sample, BOOT
if the user considers the bootstrap sample or ALL
if the user considers all of them (Default BOOT
).
a non-negative integer denoting the number of bootstrap iterations (Default 1000).
a binary value denoting if the user wants to print the output on the console 1
or not 0
(Default 1).
a logical value denoting if the user wants to fix the seed TRUE
or not FALSE
(Default TRUE).
a non-negative integer denoting the value of the seed selected if seed.t = TRUE
(Default 56666459).
a logical value denoting if the user wants to draw a plot TRUE
or not FALSE
. If it is TRUE
the evolution of the Lyapunov exponent values are represented for the whole period considering the blocking method chosen by the user. It shows as many graphs as embedding dimensions have been considered (Default TRUE
).
Julio E. Sandubete, Lorenzo Escot
Ellner, S., Gallant, A., McCaffrey, D., Nychka, D. 1991 Convergence rates and data requirements for jacobian-based estimates of lyapunov exponents from data. Physics Letters A 153(6):357-363.
McCaffrey, D.F., Ellner, S., Gallant, A.R., Nychka, D.W. 1992 Estimating the lyapunov exponent of a chaotic system with nonparametric regression. Journal of the American Statistical Association 87(419):682-695.
Nychka, D., Ellner, S., Gallant, A.R., McCaffrey, D. 1992 Finding chaos in noisy systems. Journal of the Royal Statistical Society 54(2):399-426.
Whang, Y.J., Linton, O. 1999 The asymptotic distribution of nonparametric estimates of the lyapunov exponent for stochastic time series. Journal of Econometrics 91(1):1-42.
Shintani, M., Linton, O. 2004 Nonparametric neural network estimation of Lyapunov exponents and a direct test for chaos. Journal of Econometrics 120(1):1-33.
lyapunov.max
, lyapunov.spec
## set.seed(34)
## Simulates time-series data from the Logistic map with chaos
## ts <- DChaos::logistic.sim(n=1000, a=4)
## show(head(ts, 5))
## Provides the Lyapunov exponent spectrum by the QR decomposition procedure considering the
## bootstrap blocking method directly from the Logistic map with chaos simulated.
## exponent <- DChaos::lyapunov(ts, m=3:3, lag=1:1, timelapse="FIXED", h=2:10, w0maxit=100,
## wtsmaxit=1e6, pre.white=TRUE, lyapmethod="SLE", blocking="ALL",
## B=100, trace=1, seed.t=TRUE, seed=56666459, doplot=FALSE))
## summmary(exponent)
Run the code above in your browser using DataLab