determinism {fractal} | R Documentation |
Infers the existence of deterministic structure in a given time series. If fractal strucutre exists, this function is useful in helping the user decide whether a deterministic chaotic model or stochastic fractal time series model is appropriate for their data.
determinism(x, dimension=6, tlag=NULL, olag=1, scale.min=NULL, scale.max=NULL, resolution=NULL, method="ce", n.realization=10, attach.summary=TRUE, seed=0)
x |
a numeric vector or matrix containing uniformly-sampled real-valued time series. |
attach.summary |
a logical flag. If TRUE , a summary of the
results is calculated and attached to returned object as an attribute
named "summary" . The summary statistics are calculated using the
summary method. Default: TRUE . |
dimension |
an integer defining the maximum embedding dimension to use
in analyzing the data. Default: 6 . |
method |
a character string representing the method to be used to generate surrogate data. Choices are:
Default: "ce" . |
n.realization |
an integer denoting the number of surrogate realizations to create
and analyze for comparison to the ensmeble of E-statistics. Default: 10 . |
olag |
the number of points along the trajectory of the
current point that must be exceeded in order for
another point in the phase space to be considered
a neighbor candidate. This argument is used
to help attenuate temporal correlation in the
the embedding which can lead to spuriously low
correlation dimension estimates. The orbital lag
must be positive or zero. Default: length(x)/10 or 500 , whichever is smaller. |
resolution |
a numeric value representing the spacing between scales (Euclidean bin size).
Default: diff(range(x))/1000 . |
scale.max |
a numeric value defining the maximum scale over which the results should
be returned. Default: diff(range(x)) * sqrt(dimension) . |
scale.min |
a numeric value defining the minimum scale over which the results should
be returned. Default: min(diff(sort(x)))/1000 . |
seed |
a positive integer representing the initial seed value for generating
surrogate realizations of the original input time series. These surrogates are used
to collect an ensemble of determinism statistics (see DETAILS section for more information).
If the specified seed value is positive, the seeds used for generating
the surrogate ensemble will be calculated via
set.seed(seed) ;rsample(.Machine\$integer.max, size=n.realization) .
This argument should only be used (by specifying a positive seed value) if the
user wishes to replicate a particular set of results, such as those illustrated
in the casebook examples. If seed=0 , then the random seeds will be generated
based on the current time. Default: 0 (generate the random seeds based on the current time). |
tlag |
the time delay between coordinates. Default: the decorrelation time of the autocorrelation function. |
This function calculates the so-called delta-epsilon test for detecting deterministic structure in a time series by exploiting (possible) continuity of orbits comprising a phase space topology created by a time-delayed embedding of the original time series. This phase space continuity is non-existent for stochastic white noise processes. The delta-epsilon test works by
The discriminating E-statistic is calculated as follows: Define
delta(j,k) = |z(j) - z(k)|
epsilon(j,k) = |z(j + kappa) - z(k + kappa)|
e(r) = mean(epsilon(j,k)) over scales r <= delta(j,k) < r + dr
where delta(j,k) is the Euclidean distance (using an infinity-norm metric) between phase space points z(j) and z(k), and epsilon(j,k) is the corresponding separation distance between the points at a times kappa points in the future along their respective orbits. These future points are referred to as images of the original pair. The variable kappa is referred to as the orbital lag. The increment dr is the width of a specificed Euclidean bin size. Given dr, the distance delta(j,k) is used solely to identify the proper bin in which to store the image distance epsilon(j,k). The average of each bin forms the e(r) statistic. Finally, the E-statistic is formed by calculating a cumulative summation over the the e(r) statistic, i.e.,
E(r) = cumsum(e(r))
If there exists a distinct separation of the E-statstics for the original time series and the ensemble of surrogate data, it implies that the signal is deterministic. The orbital lag kappa should be chosen large enough to sufficiently decorrelate the points evaluated along a given orbit.
an object of class determinism
.
print
,
and plot
, and eda.plot
methods.
Kaplan, D. (1994), Exceptional Events as Evidence for Determinism, Physica D, 73, 38–48.
embedSeries
, timeLag
, spaceTime
, surrogate
.
## perform a determinism test for the beamchaos ## series. in order to do so, it is vitally ## important to provide the proper orbital lag, ## which can be estimated as the lag value ## associated with the first common maxima over ## all contours in a spaceTime plot. plot(spaceTime(beamchaos)) ## we esimate an appropriate olag of 30, and ## subsequently perform the deterrminism test beam.det <- determinism(beamchaos, olag=30) print(beam.det) plot(beam.det) eda.plot(beam.det) ## perform a similar analysis for a Gaussian white ## noise realization rnorm.det <- determinism(rnorm(1024),olag=1) print(rnorm.det) plot(rnorm.det) eda.plot(rnorm.det)