Utilities for Data Analysis

The starting point for the software is a scalar time series, i.e., a Matlab column vector. As a trivial example, take the vector
» ts = (1:5)'

ts =

     1
     2
     3
     4
     5

lagembed(ts,dim,lag)

This function returns a matrix that is the "lag embedded" time series. Each row is one "embedded" point, with the most recent values in time coming first in the row.

» x = lagembed(ts,3,1)

x =

     3     2     1
     4     3     2
     5     4     3

The parameter lag defaults to 1. This is generally inappropriate if the data have correlations. (The function acf can be used to plot the autocorrelation function, if you have the Matlab signal-processing toolbox.) A useful rule of thumb is to set lag to the smallest value at which the autocorrelation function is near zero. Other prescriptions have been suggested, such as the first minimum of the mutual information.

[pre,post] = getimage(x,pred)

Many of the programs in this package attempt to characterize the dynamical function underlying the data. For instance, in the trivial time series ts, the image of the point [3,2,1] is 4. getimage is a convenience function that calculates the image of each point in the embedded data. The argumenent pred specifies how far in the future the image is to be taken.

» [pre,post] = getimage(x,1)

pre =

     3     2     1
     4     3     2


post =

     4
     5

Note that the last points in x have been dropped from pre. This is because we have no data to indicate what is the image of this point. In general, the last pred points will be dropped.