Function to deploy simulation with LSTSP algorithm
A function to generate simulation with LSTSP algorithm
simu_lstsp( nreps, simu_method = c("LS"), 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, alpha_L = 0.25, lambda.1 = NULL, mu.1 = NULL, lambda.1.seq = NULL, mu.1.seq = NULL, lambda.2, mu.2, lambda.3, mu.3, omega = NULL, h = NULL, step.size = NULL, tol = 1e-04, niter = 100, backtracking = TRUE, rolling.skip = 5, cv = FALSE, nfold = NULL, verbose = FALSE )
nreps
: A positive integer, indicating the number of simulation replicationssimu_method
: the structure of time series: only available for "LS"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.alpha_L
: a positive numeric value, indicating the restricted space of low rank component, default is 0.25lambda.1
: tuning parameter for sparse component for the first stepmu.1
: tuning parameter for low rank component for the first steplambda.1.seq
: a sequence of lambda to the left segment for cross-validation, it's not mandatory to providemu.1.seq
: a sequence of mu to the left segment, low rank component tuning parameterlambda.2
: tuning parameter for sparse for the second stepmu.2
: tuning parameter for low rank for the second steplambda.3
: tuning parameter for estimating sparse componentsmu.3
: tuning parameter for estimating low rank componentsomega
: tuning parameter for information criterion, the larger of omega, the fewer final selected change pointsh
: window size of the first rolling window stepstep.size
: rolling steptol
: tolerance for the convergence in the second screening step, indicates when to stopniter
: the number of iterations required for FISTA algorithmbacktracking
: A boolean argument to indicate use backtrack to FISTA modelrolling.skip
: The number of observations need to skip near the boundariescv
: A boolean argument, indicates whether the user will apply cross validation to select tuning parameter, default is FALSEnfold
: An positive integer, the number of folds for cross validationverbose
: If is TRUE, then it will print all information about current step.A S3 object of class VARDetect.simu.result
, containing the following entries:
nob <- 100 p <- 15 brk <- c(50, nob+1) rank <- c(1, 3) signals <- c(-0.7, 0.8) singular_vals <- c(1, 0.75, 0.5) info_ratio <- rep(0.35, 2) lambda1 = lambda2 = lambda3 <- c(2.5, 2.5) mu1 = mu2 = mu3 <- c(15, 15) try_simu <- simu_lstsp(nreps = 3, simu_method = "LS", nob = nob, k = p, brk = brk, sigma = diag(p), signals = signals, rank = rank, singular_vals = singular_vals, info_ratio = info_ratio, sp_pattern = "off-diagonal", spectral_radius = 0.9, lambda.1 = lambda1, mu.1 = mu1, lambda.2 = lambda2, mu.2 = mu2, lambda.3 = lambda3, mu.3 = mu3, step.size = 5, niter = 20, rolling.skip = 5, cv = FALSE, verbose = TRUE) summary(try_simu, critical = 5)
Useful links