ccm_lagged_oneway: Cross-mapping from one variable to another variable over a...

Description Usage Arguments

Description

Cross-mapping from one variable to another variable over a range of lags.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ccm_lagged_oneway(data, lags, E = NULL, tau = NULL,
  library.sizes = as.integer(nrow(data)/2), lib = c(1, dim(data)[1]),
  pred = lib, samples.original = 100, samples.surrogates = 50,
  n.surrogates = 0, surrogate.method = "AAFT", always.run.surrogates = F,
  time.unit = NULL, time.bin.size = NULL, num.neighbours = E + 1,
  random.libs = TRUE, with.replacement = TRUE,
  exclusion.radius = ifelse(is.null(E), yes = 10, no = E + 1),
  epsilon = NULL, RNGseed = 1111, silent = TRUE, time.run = F,
  print.to.console = T, time.series.length.threshold = 100,
  library.column = 1, target.column = 2, surrogate.column = target.column,
  convergence.test = TRUE, parallel = TRUE, parallelize.on.each.lag = F,
  num.cores = parallel::detectCores() - 1, n.libsizes.to.check = 30,
  regression.convergence.plots = F, max.E = 10, max.tau = 1)

Arguments

data

A data frame containing two columns - one for the presumed driver and one for the response.

lags

A vector of lags to compute CCM for.

E

The embedding dimension. Defaults to NULL, which triggers automated optimisation of the embedding dimension up to the dimension specified by 'max.E'.

tau

The embedding lag. Defaults to NULL, which triggers automated optimisation of the embedding lag up to the dimension specified by 'max.tau'. For sparsely sampled time series (for example geological time series), it is wise to set this value to 1. For densely sampled time series, this should be set to the first minima of the autocorrelation function of the presumed driver.

library.sizes

The size of the random libraries drawn when calculating cross map skill.

lib

Indices of the original library time series to use as the library (training) set.

pred

Indices of the original target time series to use as prediction set. If this overlaps with the training set, make sure to use leave-K-out cross validation setting the 'exclusion.radius' parameters to a minimum of E + 1.

samples.original

The number of random libraries to draw when calculating cross map skill.

samples.surrogates

The number of surrogate time series in the null ensemble.

n.surrogates

Should a surrogate test also be performed? If so, 'n.surrogates' sets the number of surrogate time series to use. By default, no surrogate test is performed (n.surrogates = 0).

surrogate.method

The type of surrogate time series to generate. Will vary depending on what null hypothesis is being tested. Defaults to AAFT surrogates.

always.run.surrogates

Should surrogate analyses be performed even if the convergence test fails? Defaults to FALSE (there is no reason to perform significance testing if the analysis is not causal to begin with).

time.unit

The time unit of the raw time series.

time.bin.size

The temporal resolution of the raw time series (given in the units indicated by 'time.unit').

num.neighbours

The number of nearest neighbours to use in predictions. Defaults to E + 1.

random.libs

Whether or not to sample random library (training) sets. Defaults to TRUE.

with.replacement

Should samples be drawn with replacement? Defaults to TRUE.

exclusion.radius

The number of temporal neighbours to exclude for the leave-K-out cross validation.

epsilon

Exlude neighbours if the are within a distance of 'epsilon' from the predictee.

RNGseed

For reproducivility. Seed to use for the random number generator.

silent

Suppress warnings?

time.run

Time the run?

print.to.console

Display progress?

time.series.length.threshold

Display a warning if the time series length drops below this threshold.

library.column

Integer indicating which column to use as the library column (presumed response) (1 for the first column and 2 for the second column).

target.column

Integer indicating which column to use as the target column (presumed driver). Defaults to the opposite of 'library.column'.

surrogate.column

Which column to use to generate surrogates. Defaults to the value of 'target.column' (the presumed driver).

convergence.test

Should a convergence test be performed? Analyses where CCM does not convergence are nonsensical, so this option defaults to TRUE.

parallel

Activate parallellisation? Defaults to true. Currently, this only works decently on Mac and Linux systems.

parallelize.on.each.lag

Should parallellisation be done on the outer lag loop? Defaults to TRUE. Otherwise, parallellisation is done over the surrogate analyses.

num.cores

The number of CPU cores to use for parallelisation. Defaults to one core less than what is available.

n.libsizes.to.check

How many library sizes to use for the convergence check? Defaults to 30.

regression.convergence.plots

Display regression plots for the convergence test? Defaults to FALSE.

max.E

The maximum embedding dimension for which to optimise 'E'.

max.tau

The maximum embedding lag for which to optimise 'tau'.


kahaaga/tstools documentation built on May 24, 2019, 5:01 a.m.