Movatterモバイル変換


[0]ホーム

URL:


ccid

The goal of ccid is to implement the Cross-Covariance Isolate Detect(CCID) methodology for the estimation of the number and location ofmultiple change-points in the second-order (cross-covariance or network)structure of multivariate, possibly high-dimensional time series. Themethod is motivated by the detection of change points in functionalconnectivity networks for functional magnetic resonance imaging (fMRI),electroencephalography (EEG), magentoencephalography (MEG) andelectrocorticography (ECoG) data. The main routines in the package havebeen extensively tested on fMRI data. For details on the CCIDmethodology, please see Anastasiou et al (2020).

Installation

You can install the released version of ccid fromCRAN with:

install.packages("ccid")

Example

These are two basic examples which show you how to detect changes (ifthere are any) in the second-order (cross-covariance or network)structure of multivariate, possibly high-dimensional time series.

library(ccid)## An example of three change-points in the cross-covariance structure## of a multivariate time series of length 400 and dimensionality equal to 40.set.seed(111111)num.nodes<-40# number of nodesetaA.1<-0.95etaA.2<-0.05pcor1<- GeneNet::ggm.simulate.pcor(num.nodes,etaA = etaA.1)pcor2<- GeneNet::ggm.simulate.pcor(num.nodes,etaA = etaA.2)n<-100data1<- GeneNet::ggm.simulate.data(n, pcor1)data2<- GeneNet::ggm.simulate.data(n, pcor2)X1<-rbind(data1, data2, data1, data2)## change-points at 100, 200, 300N1<-detect.ic(X1,approach ='euclidean',scales =-1)N2<-detect.ic(X1,approach ='infinity',scales =-1)N1$changepoints#> [1] 100 199 300N2$changepoints#> [1] 100 199 300N1$no.of.cpts#> [1] 3N2$no.of.cpts#> [1] 3## An example of no change-points.set.seed(11)A<-matrix(rnorm(20*400),nrow =400)## No change-pointM1<-detect.ic(A,approach ='euclidean',scales =-1)M2<-detect.ic(A,approach ='infinity',scales =-1)M1$changepoints#> [1] NAM2$changepoints#> [1] NA

[8]ページ先頭

©2009-2025 Movatter.jp