Simulation function for TBSS algorithm
Function for deploying simulation using TBSS algorithm
simu_tbss( nreps, simu_method = c("sparse", "group sparse", "fLS"), nob, k, lags = 1, lags_vector = NULL, brk, sigma, skip = 50, group_mats = NULL, group_type = c("columnwise", "rowwise"), group_index = NULL, sparse_mats = NULL, sp_density = NULL, signals = NULL, rank = NULL, info_ratio = NULL, sp_pattern = c("off-diagonal", "diagoanl", "random"), singular_vals = NULL, spectral_radius = 0.9, est_method = c("sparse", "group sparse", "fLS"), q = 1, tol = 0.01, lambda.1.cv = NULL, lambda.2.cv = NULL, mu = NULL, group.index = NULL, group.case = c("columnwise", "rowwise"), max.iteration = 100, refit = FALSE, block.size = NULL, blocks = NULL, use.BIC = TRUE, an.grid = NULL, verbose = FALSE )
nreps
: A numeric integer number, indicates the number of simulation replicationssimu_method
: the structure of time series: "sparse","group sparse", and "fLS"nob
: sample sizek
: dimension of transition matrixlags
: lags of VAR time series. Default is 1.lags_vector
: a vector of lags of VAR time series for each segmentbrk
: a vector of break points with (nob+1) as the last elementsigma
: the variance matrix for error termskip
: an argument to control the leading data points to obtain a stationary time seriesgroup_mats
: transition matrix for group sparse casegroup_type
: type for group lasso: "columnwise", "rowwise". Default is "columnwise".group_index
: group index for group lasso.sparse_mats
: transition matrix for sparse casesp_density
: if we choose random pattern, we should provide the sparsity density for each segmentsignals
: manually setting signal for each segment (including sign)rank
: if we choose method is low rank plus sparse, we need to provide the ranks for each segmentinfo_ratio
: the information ratio leverages the signal strength from low rank and sparse componentssp_pattern
: a choice of the pattern of sparse component: diagonal, 1-off diagonal, random, customsingular_vals
: singular values for the low rank componentsspectral_radius
: to ensure the time series is piecewise stationary.est_method
: method: sparse, group sparse, and fixed low rank plus sparse. Default is sparseq
: the AR ordertol
: tolerance for the fused lassolambda.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"group.index
: group index for group sparse casegroup.case
: group sparse pattern: column, row.max.iteration
: max number of iteration for the fused lassorefit
: logical; if TRUE, refit the VAR model for parameter estimation. Default is FALSE.block.size
: the block sizeblocks
: the blocksuse.BIC
: use BIC for k-means partan.grid
: a vector of an for grid searchingverbose
: a Boolean argument; if TRUE, function provides detailed information. Default is FALSEA S3 object of class, named VARDetect.simu.result
nob <- 4000; p <- 15 brk <- c(floor(nob / 3), floor(2 * nob / 3), nob + 1) m <- length(brk); q.t <- 1 sp_density <- rep(0.05, m * q.t) signals <- c(-0.6, 0.6, -0.6) try_simu <- simu_tbss(nreps = 3, simu_method = "sparse", nob = nob, k = p, lags = q.t, brk = brk, sigma = diag(p), signals = signals, sp_density = sp_density, sp_pattern = "random", est_method = "sparse", q = q.t, refit = TRUE)
Useful links