DP.VAR1 {changepoints} | R Documentation |
Dynamic programming for VAR1 change points detection through l_0
penalty.
Description
Perform dynamic programming for VAR1 change points detection through l_0
penalty.
Usage
DP.VAR1(X_futu, X_curr, gamma, lambda, delta, eps = 0.001)
Arguments
X_futu |
A |
X_curr |
A |
gamma |
A |
lambda |
A |
delta |
A strictly |
eps |
A |
Value
An object of class
"DP", which is a list
with the following structure:
partition |
A vector of the best partition. |
cpt |
A vector of change points estimation. |
Author(s)
Daren Wang & Haotian Xu
References
Wang, Yu, Rinaldo and Willett (2019) <arxiv:1909.06359>
Examples
p = 10
sigma = 1
n = 20
v1 = 2*(seq(1,p,1)%%2) - 1
v2 = -v1
AA = matrix(0, nrow = p, ncol = p-2)
A1 = cbind(v1,v2,AA)*0.1
A2 = cbind(v2,v1,AA)*0.1
A3 = A1
data = simu.VAR1(sigma, p, 2*n+1, A1)
data = cbind(data, simu.VAR1(sigma, p, 2*n, A2, vzero=c(data[,ncol(data)])))
data = cbind(data, simu.VAR1(sigma, p, 2*n, A3, vzero=c(data[,ncol(data)])))
N = ncol(data)
X_curr = data[,1:(N-1)]
X_futu = data[,2:N]
DP_result = DP.VAR1(X_futu, X_curr, gamma = 1, lambda = 1, delta = 5)
DP_result$cpt
[Package changepoints version 1.1.0 Index]