Potsdam Institute for Climate Impact Research (PIK)
Interdisciplinary Center for Dynamics of Complex Systems (University of Potsdam)
Cardiovascular Physics Group (Humboldt-Universität zu Berlin)
PIK Logo
TOCSY - Toolboxes for Complex Systems
PIK/ Antique/ Blue
Home Home
ACE - Nonlinear Regression Analysis ACE
Adaptive Filtering Procedure Adaptive Filtering
CoinCalc - Event Coincidence Analysis CoinCalc
COPRA - Constructing Proxy Records From Age Models COPRA
Cross Recurrence Plot Toolbox CRP Toolbox
Commandline Recurrence Plots Commandline RPs
Analyse Coupling of Transient Dynamics Coupling Analysis
Identification of Coupling Direction Coupling Direction
Inner Composition Alignment IOTA
Dynamical Invariants by Recurrence Plots K2
Toolbox for the analysis of non-equidistantly sampled time series NEST
DSProlog DSProlog
PECUZAL PECUZAL
Permutation Entropy PETROPY
pyunicorn ‐ UNIfied COmplex Network and Recurrence aNalysis toolbox pyunicorn
Symbolic Dynamics from Recurrence Plots RECGRAM
Recurrence Plots for MATLAB RP
Recurrence Structure Analysis RSA
Wavelet and Coherence Analysis SOWAS
System Identification Tool System Identification
Time Series Graph and Momentary Information Transfer Estimation TiGraMITe

NESToolbox – toolbox for the analysis of non-equidistantly sampled time series

Version 1.01, last mod. 18-Mar-2014 (for MATLAB® and Octave)
Python port available!


General Notes

The NESToolbox is a collection of algorithms to perform similarity estimation for irregularly sampled time series as they arise for example in the geosciences. It is implemented as a toolbox for the widely used software MATLAB and the freely available open-source software OCTAVE.


Installation

To install the toolbox, call the downloaded script install.m from the Matlab or Octave commandline. The toolbox will be installed in the user's toolbox folder. In Matlab this is usually a folder called matlab in the users home directory). In Octave, the standard folder in the home directory is called octave. Check the script test_nest.m for usage examples and tests.

The installation of the Python portation is simple: just copy the nest.py in your working directory.


Requirements

The toolbox was tested using Matlab R2011b and R2012b with and without the optimization toolbox present. If the Optimization toolbox is not available, the parameter estimation in the function tauest_ls.m cannot be performed using nonlinear least squares. The function ar1sur.m therefore computes the lag-1 autocorrelation using the Gaussian-kernel based estimator instead. This is also the case in Octave 3.2.4, where the toolbox also requires the additional, freely available, package octave-signal.

The Python port needs the following Python packages:

  • Scipy with Scipy.Weave
  • Numpy
  • Matplotlib (optional)


Usage

At the center of the toolbox are the functions for linear and nonlinear similarity estimation for irregular time series, which are based on Gaussian-kernel weight functions. Cross-correlation estimation, as it is used in most standard time series analysis, cannot be performed for irregular time series directly, as the vector index cannot be used as a substitute for time differences. The conventional approach, interpolation of the time series to regular grid followed by the use of standard estimators, has bias side effects [1]. The function similarity.m makes alternative approaches such as the Gaussian-kernel-based cross correlation [1], the nonlinear Gaussian-kernel-based mutual information [2] or the Event Synchronization function [3] available under a single, unified syntax. Additional functions allow for the estimation of uncorrelated time series surrogates to test the significance of similarity estimates as well as nonlinear trends, power spectra and weighted scatterplots. The usage of these functions is illustrated in the script test_nest.m, and a list of the available functions can be found in Contents.m.

Sliding window Gaussian-kernel correlation.
Sliding window Gaussian-kernel correlation of coupled AR1 timeseries generated using the function simgram. The coupling delay was changed from 5 to 0 after 5000 years.

Example

We take two time series from stochastic processes X and Y, {tx,x} and {ty,y}, which are defined as follows:
% Sampling times 
tx = (1:1001)'; ty = (1:1001)'; 

% Original signals 
x = randn(1001,1);
x(2:end) = 0.5*x(1:end-1)+randn(1000,1); 
y = randn(1001,1);
y(2:end) = 0.7*x(1:end-1)+randn(1000,1);
We have, however, in reality, observed only 50% of the points in y, yielding a time series {tymiss,ymiss}:
rem = randi(length(ty), floor(length(ty)*0.5),1); 
ty_miss = ty; ty_miss(rem) = [];
y_miss = y; y_miss(rem) = [];
We can now calculate the ACF for the time series {tymiss,ymiss} as follows:
First we create a lag vector,
lag = -50:50;
and we define the kernel width we want to employ:
H = 0.25; 
Now the ACF of {tymiss;ymiss} is given by
Cy = nexcf(ty_miss, y_miss, ty_miss, y_miss, lag, H); 
plot(lag,Cy), xlabel('Lag'), ylabel('Auto-correlation C_{y}')
ACF calculated by NEXCF

and the CCF, indicating in this example the lag and the magnitude of the coupling, is given by

Cxy = nexcf(tx, x, ty, y, lag, H);
plot(lag,Cxy), xlabel('Lag'), ylabel('Cross-correlation C_{xy}')
CCF calculated by NEXCF

References

  1. Rehfeld, K., Marwan, N., Heitzig, J., Kurths, J.: Comparison of correlation analysis techniques for irregularly sampled time series, Nonlin. Proc. Geophys., 18(3), 389-404, 2011.

  2. Rehfeld, K., Marwan, N., Breitenbach, S., Kurths, J.: Comparison of correlation analysis techniques for irregularly sampled time series, Climate Dynamics, Late Holocene Asian Monsoon Dynamics from small but complex paleoclimate networks, 41(1), 3-19 2013.

  3. Rehfeld, K., Kurths, J.: Similarity measures for irregular and age uncertain time series, Clim. Past., 10, 107-122, 2014.


Download

Matlab: install.m
Python: nest_python.zip


Author

Kira Rehfeld, Bedartha Goswami
with ideas and contributions from Norbert Marwan and ideas from Jobst Heitzig, Bedartha Goswami, and Sebastian Breitenbach.



© 2004-2023 SOME RIGHTS RESERVED
University of Potsdam, Interdisciplinary Center for Dynamics of Complex Systems, Germany
Potsdam Institute for Climate Impact Research, Complexity Science, Germany

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Germany License.
Imprint, Data policy, Disclaimer, Accessibility statement

Please respect the copyrights! The content is protected by the Creative Commons License. If you use the provided programmes, text or figures, you have to refer to the given publications and this web site (tocsy.pik-potsdam.de) as well.

@MEMBER OF PROJECT HONEY POT
Spam Harvester Protection Network
provided by Unspam