Block segmentation scheme (BSS).
Perform the block segmentation scheme (BSS) algorithm to detect the structural breaks in large scale high-dimensional non-stationary VAR models.
tbss( data, method = c("sparse", "group sparse", "fLS"), group.case = c("columnwise", "rowwise"), group.index = NULL, lambda.1.cv = NULL, lambda.2.cv = NULL, mu = NULL, q = 1, max.iteration = 50, tol = 10^(-2), block.size = NULL, blocks = NULL, refit = FALSE, use.BIC = TRUE, an.grid = NULL, verbose = FALSE )
data
: input data matrix, with each column representing the time series componentmethod
: method: sparse, group sparse, and fixed low rank plus sparse. Default is sparsegroup.case
: group sparse pattern: column, row.group.index
: group index for group sparse caselambda.1.cv
: tuning parameter lambda_1 for fused lassolambda.2.cv
: tuning parameter lambda_2 for fused lassomu
: tuning parameter for low rank component, only available when method is set to "fLS"q
: the VAR lagmax.iteration
: max number of iteration for the Fused lassotol
: tolerance for the fused lassoblock.size
: the block sizeblocks
: the blocksrefit
: logical; if TRUE, refit the VAR model for parameter estimation. Default is FALSE.use.BIC
: use BIC for k-means partan.grid
: a vector of an for grid searchingverbose
: a Boolean argument to determine whether provide detailed outputs for each step. Default is FALSES3 object of class VARDetect.result
, which contains the followings
#### sparse VAR model nob <- (10^3) # number of time points p <- 15; # number of time series components brk <- c(floor(nob/3),floor(2*nob/3),nob+1); # true break points with nob+1 as the last element m0 <- length(brk) -1; # number of break points q.t <- 1; # the true AR order m <- m0+1 #number of segments try<-simu_var('sparse',nob=nob,k=p,lags=q.t,brk = brk,sp_pattern="off-diagonal",seed=1) data <- try$series data <- as.matrix(data) #run the bss method fit <- tbss(data, method = "sparse", q = q.t) print(fit) summary(fit) plot(fit, data, display = "cp") plot(fit, data, display = "param") ###### Example for fixed low rank plus sparse structure VAR model nob <- 300 p <- 15 brk <- c(floor(nob/3), floor(2*nob/3), nob+1) m <- length(brk) q.t <- 1 signals <- c(-0.7, 0.7, -0.7) rank <- c(2, 2, 2) singular_vals <- c(1, 0.75) info_ratio <- rep(0.35, 3) try <- simu_var(method = "fLS", nob = nob, k = p, lags = 1, brk = brk, sigma = as.matrix(diag(p)), signals = signals, seed=1, rank = rank, singular_vals = singular_vals, info_ratio = info_ratio, sp_pattern = "off-diagonal", spectral_radius = 0.9) data <- try$series data <- as.matrix(data) fit <- tbss(data, method = "fLS", mu = 150) print(fit) summary(fit) plot(fit, data, display = "cp") plot(fit, data, display = "param")
Useful links