CCM: Calculate the CCM of two sequences

Description Usage Arguments Value Examples

Description

Takes in two sequences, calculate CCM value in different time lag, and plot the result

Usage

1
CCM(x, y, maxLag = 20, timestep = 1, tag, E = 2, ...)

Arguments

x

A vector represents the time sequence

y

A vector represents another time sequence

maxLag

Max time lag needs to be calculated

timestep

Interval of time lag

tag

Select the dots of x and y to calculate the CCM

E+1

The embedded dimension of the manifold

Value

Return a list of time lag sequence, yCausex and xCausey

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1)
y<-rnorm(100)
x<-y*2+1
tag=c(1:100)
result<-CCM(x,y,maxLag=20,timestep=1,tag=tag,E=2)
# plot the data
testData<-data.frame(u,y)
matplot (testData, type = "l", lty = 1:2, lwd = 1, pch = NULL,
         col = 1:2)
legend("topright",colnames(testData),lty = 1:2, lwd = 1, pch = NULL,
      col = 1:2)

chengfeifan/myCCM documentation built on May 13, 2019, 3:40 p.m.