Title: | Vine Copula Change Point Detection in Multivariate Time Series |
---|---|
Description: | Implements the Vine Copula Change Point (VCCP) methodology for the estimation of the number and location of multiple change points in the vine copula structure of multivariate time series. The method uses vine copulas, various state-of-the-art segmentation methods to identify multiple change points, and a likelihood ratio test or the stationary bootstrap for inference. The vine copulas allow for various forms of dependence between time series including tail, symmetric and asymmetric dependence. The functions have been extensively tested on simulated multivariate time series data and fMRI data. For details on the VCCP methodology, please see Xiong & Cribben (2021). |
Authors: | Xin Xiong [aut, cre], Ivor Cribben [aut] |
Maintainer: | Xin Xiong <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2025-03-10 05:04:47 UTC |
Source: | https://github.com/xinxiong0238/vccp |
This function plots the change points in the network structure between multivariate time series detected by the VCCP model.
getTestPlot(vccp_result)
getTestPlot(vccp_result)
vccp_result |
A list generated from |
No return value, called for a plotting purpose.
## Simulate MVN data with 2 change points data = cbind(1:180, mvn.sim.2.cps(180,8,seed=101)) ## Change point detection using VCCP (it may take several minutes to complete...) result = vccp.fun(data, "NBS", test = "V") ## Plot the result getTestPlot(result) result.2 = vccp.fun(data, "NBS", test = "B") ## Plot the result getTestPlot(result.2)
## Simulate MVN data with 2 change points data = cbind(1:180, mvn.sim.2.cps(180,8,seed=101)) ## Change point detection using VCCP (it may take several minutes to complete...) result = vccp.fun(data, "NBS", test = "V") ## Plot the result getTestPlot(result) result.2 = vccp.fun(data, "NBS", test = "B") ## Plot the result getTestPlot(result.2)
This function simulates a multivariate normal data set with 2 change points in the network structure.
mvn.sim.2.cps(nobs, n_ser, seed = 101)
mvn.sim.2.cps(nobs, n_ser, seed = 101)
nobs |
A positive integer, which defines the length of the time series. It must be a multiple of 3 since change points occur at time points T/3 and 2T/3. |
n_ser |
A positive integer number indicating the dimensionality of the
time series. |
seed |
A positive integer with default value equal to 101. It is used to ensure reproducibility. |
A nobs
* n_ser
matrix with 2 change points
at time points nobs/3+1
and nobs*2/3+1
.
## Simulate MVN data with 2 change points data <- mvn.sim.2.cps(180, 8, seed = 101)
## Simulate MVN data with 2 change points data <- mvn.sim.2.cps(180, 8, seed = 101)
The vccp package implements the Vine Copula Change Point (VCCP) methodology for the estimation of the number and location of multiple change points in the vine copula structure of multivariate time series. The method uses vine copulas, various state-of-the-art segmentation methods to identify multiple change points, and a likelihood ratio test or the stationary bootstrap for inference. The vine copulas allow for various forms of dependence between time series including tail, symmetric and asymmetric dependence. The functions have been extensively tested on simulated multivariate time series data and fMRI data. For details on the VCCP methodology, please see Xiong & Cribben (2021).
mvn.sim.2.cps, getTestPlot and vccp.fun
Xin Xiong, Ivor Cribben ([email protected])
"Beyond linear dynamic functional connectivity: a vine copula change point model", Xiong and Cribben (2021), bioRxiv 2021.04.25.441254.
# See examples in the function vccp.fun.
# See examples in the function vccp.fun.
This function detects multiple change points in the vine copula structure of a multivariate time series using vine copulas, various state-of-the-art segmentation methods to identify multiple change points, and a likelihood ratio test or the stationary bootstrap for inference.
vccp.fun( X, method = "NBS", delta = 30, G = 0.1, M = NA, test = "V", CDR = "D", trunc_tree = NA, family_set = 1, pre_white = 0, ar_num = 1, p = 0.3, N = 100, sig_alpha = 0.05 )
vccp.fun( X, method = "NBS", delta = 30, G = 0.1, M = NA, test = "V", CDR = "D", trunc_tree = NA, family_set = 1, pre_white = 0, ar_num = 1, p = 0.3, N = 100, sig_alpha = 0.05 )
X |
A numerical matrix representing the multivariate time series, with the columns representing its components. If multiple subjects are included (panel data), vertically stack the subject data and identify timestamps of each subject in the first column. |
method |
A character string, which defines the
segmentation method. If |
delta |
A positive integer number with default value equal to 30.
It is used to define the minimum distance acceptable between
change points. In general, |
G |
A positive real number between 0 and 1 with default value equal to 0.1.
It is used to define the moving sum bandwidth relative to |
M |
A positive integer with default value equal to floor(9*log(T)) (T is the length of the time series).
It represents the number of sub-samples in WBS when
|
test |
A character string, which defines the inference
method used. If |
CDR |
A character string, which defines the vine structure.
If |
trunc_tree |
A positive integer, which defines the level
of truncation for the vine copula. If |
family_set |
A positive integer, which defines the bivariate copula
family. If |
pre_white |
A positive integer, which defines whether
the data is pre-whitened. If |
ar_num |
A positive integer, which defines the maximum
order of model to fit to preprocess the data (see |
p |
A positive real number between 0 and 1 which is
defined as the block size in the stationary bootstrap
method ( |
N |
A positive integer, which defines the number
of the stationary bootstrap resamples used. The default value is |
sig_alpha |
A positive real number between 0 and 1, which defines the significance level of the inference test. The default values is 0.05. |
The time series X_t
is of dimensionality p and we are
looking for changes in the vine copula structure between
the different time series components X_{t}^{(1)}, X_{t}^{(2)},
..., X_{t}^{(p)}
. VCCP uses vine copulas, various state-of-the-art
segmentation methods to identify multiple change points,
and a likelihood ratio test or the stationary bootstrap for inference.
A list with the following components:
loc_of_cpts |
The locations of the detected change points. |
no_of_cpts |
The number of detected change points. |
test_df |
A dataframe containing the test result. |
compute_time |
Time (in minutes) to run vccp.fun . |
T |
The length of the time series data. |
sig_alpha |
The significance level for the inference test. |
Xin Xiong, Ivor Cribben ([email protected])
"Beyond linear dynamic functional connectivity: a vine copula change point model", Xiong and Cribben (2021), bioRxiv 2021.04.25.441254.
## Simulate MVN data with 2 change points data <- cbind(1:180, mvn.sim.2.cps(180, 8, seed = 101)) T <- 180 ## Change point detection using VCCP (it may take several minutes to complete...) result.NV <- vccp.fun(data, method = "NBS", delta = 30, test = "V") ## Plot the results getTestPlot(result.NV) #title("VCCP: NBS + Vuong") ## Change point detection using NBS and stationary bootstrap for inference result.NB <- vccp.fun(data, method = "NBS", delta = 30, test = "B") ## Plot the results getTestPlot(result.NB) title("VCCP: NBS + Stationary Bootstrap")
## Simulate MVN data with 2 change points data <- cbind(1:180, mvn.sim.2.cps(180, 8, seed = 101)) T <- 180 ## Change point detection using VCCP (it may take several minutes to complete...) result.NV <- vccp.fun(data, method = "NBS", delta = 30, test = "V") ## Plot the results getTestPlot(result.NV) #title("VCCP: NBS + Vuong") ## Change point detection using NBS and stationary bootstrap for inference result.NB <- vccp.fun(data, method = "NBS", delta = 30, test = "B") ## Plot the results getTestPlot(result.NB) title("VCCP: NBS + Stationary Bootstrap")