The KCP permutation test implements the variance test and the variance drop test to determine if there is at least one change point in the running statistics
permTest(
data,
RS_fun,
wsize = 25,
nperm = 1000,
Kmax = 10,
alpha = 0.05,
varTest = FALSE
)
Significance of having at least one change point. 0 - Not significant, 1- Significant
P-value of the variance test.
P-value of the variance drop test.
A matrix of minimized variance criterion for the permuted data.
A matrix of minimized variance criterion for the permuted data without NA values.
data N x v dataframe where N is the number of time points and v the number of variables
Running statistics function: Should require the time series and wsize
as input and return a dataframe of running statistics
as output. This output dataframe should have rows that correspond to the time windows and columns that correspond to the variable(s) on which the running statistics were computed.
Window size
Number of permutations to be used in the permutation test
Maximum number of change points desired
Significance level of the permutation test
If FALSE, only the variance DROP test is implemented, and if TRUE, both the variance and the variance DROP tests are implemented.
Cabrieto, J., Tuerlinckx, F., Kuppens, P., Hunyadi, B., & Ceulemans, E. (2018). Testing for the presence of correlation changes in a multivariate time series: A permutation based approach. Scientific Reports, 8, 769, 1-20. doi:10.1038/s41598-017-19067-2