View source: R/ccm-on-single-libsize.R

Performs CCM for a single set of parameters and a specified library size. Convenience function to allow low-level parallellisation.

1 2 3 4 5 6 7 8 | ```
ccm_on_single_libsize(library.size, data, lag = 0, E = 2, tau = 1,
lib = c(1, dim(data)[1]), pred = lib, samples.original = 100,
samples.surrogates = 50, num.neighbours = E + 1, random.libs = TRUE,
with.replacement = TRUE, exclusion.radius = E + 1, epsilon = NULL,
silent = TRUE, RNGseed = 1111, surrogate.method = "AAFT",
n.surrogates = 0, parallel = FALSE, library.column = 1,
target.column = 2, surrogate.column = 2, print.to.console = T,
n.libsizes.to.check = 20)
``` |

`library.size` |
The size of each random library (training set). |

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

`lag` |
The lag (called prediction horizon in rEDM::ccm) for which to compute CCM. |

`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. |

`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 the cross map skill. |

`samples.surrogates` |
The number of surrogate time series in the null ensemble. |

`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. Defaults to E + 1. |

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

`silent` |
Suppress warnings? |

`RNGseed` |
A random number seed. For reproducibility. |

`surrogate.method` |
Which method should be used to generate surrogate time series? Defaults to "AAFT". For more options, see the description of the 'surrogate_ensemble' function in this package. |

`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). |

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

`library.column` |
Integer indicating which column to use as the library column (presumed response). |

`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). |

`print.to.console` |
Display progress? |

`n.libsizes.to.check` |
Minimum number of library sizes for the convergence test. |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.