| multispatialccm | R Documentation |
multispatial convergent cross mapping
## S4 method for signature 'list'
multispatialccm(
data,
cause,
effect,
libsizes,
E = 3,
tau = 1,
k = E + 1,
lib = NULL,
boot = 99,
seed = 42,
dist.metric = "L1",
dist.average = TRUE,
threads = length(libsizes),
parallel.level = "low",
bidirectional = TRUE,
progressbar = TRUE
)
data |
observation data. |
cause |
name of causal variable. |
effect |
name of effect variable. |
libsizes |
number of time points used in prediction. |
E |
(optional) embedding dimensions. |
tau |
(optional) step of time lags. |
k |
(optional) number of nearest neighbors used in prediction. |
lib |
(optional) libraries indices. |
boot |
(optional) number of bootstraps to perform. |
seed |
(optional) random seed. |
dist.metric |
(optional) distance metric ( |
dist.average |
(optional) whether to average distance. |
threads |
(optional) number of threads to use. |
parallel.level |
(optional) level of parallelism, |
bidirectional |
(optional) whether to examine bidirectional causality. |
progressbar |
(optional) whether to show the progress bar. |
A list
xmapcross mapping results
varnamenames of causal and effect variables
bidirectionalwhether to examine bidirectional causality
Clark, A.T., Ye, H., Isbell, F., Deyle, E.R., Cowles, J., Tilman, G.D., Sugihara, G., 2015. Spatial convergent cross mapping to detect causal relationships from short time series. Ecology 96, 1174–1181.
set.seed(42)
obs = runif(10,0,0.1)
sim = vector("list",5)
for (i in seq_along(obs)){
sim[[i]] = logistic_map(x = obs[i],y = obs[i],step = 15,beta_xy = 0.5,beta_yx = 0)
}
lst = list(x = do.call(cbind, lapply(sim, function(df) df$x)),
y = do.call(cbind, lapply(sim, function(df) df$y)))
multispatialccm(lst,"x","y",libsizes = 1:5,E = 2,k = 3,threads = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.