DP.VAR1 | R Documentation |
Perform dynamic programming for VAR1 change points detection through l_0 penalty.
DP.VAR1(X_futu, X_curr, gamma, lambda, delta, eps = 0.001)
X_futu |
A |
X_curr |
A |
gamma |
A |
lambda |
A |
delta |
A strictly |
eps |
A |
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. |
Daren Wang & Haotian Xu
Wang, Yu, Rinaldo and Willett (2019) <arxiv:1909.06359>
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.