l1-regularised Yule-Walker estimation for VAR processesEstimates the VAR parameter matrices via l1-regularised Yule-Walker estimation
and innovation covariance matrix via constrained l1-minimisation.
fnets.var(
x,
center = TRUE,
method = c("lasso", "ds"),
lambda = NULL,
var.order = 1,
tuning.args = list(tuning = c("cv", "bic"), n.folds = 1, penalty = NULL, path.length =
10),
do.threshold = FALSE,
n.iter = NULL,
tol = 0,
n.cores = 1
)a list which contains the following fields:
estimate of VAR parameter matrix; each column contains parameter estimates for the regression model for a given variable
estimate of the innovation covariance matrix
l1-regularisation parameter
VAR order
if center = TRUE, returns a vector containing row-wise sample means of x; if center = FALSE, returns a vector of zeros
input time series each column representing a time series variable; it is coerced into a ts object
whether to de-mean the input x
a string specifying the method to be adopted for VAR process estimation; possible values are:
"lasso"Lasso-type l1-regularised M-estimation
"ds"Dantzig Selector-type constrained l1-minimisation
l1-regularisation parameter; if lambda = NULL, tuning is employed to select the parameter
order of the VAR process; if a vector of integers is supplied, the order is chosen via tuning
a list specifying arguments for tuning
for selecting the regularisation parameter (and VAR order). It contains:
tuninga string specifying the selection procedure for var.order and lambda; possible values are:
"cv" for cross validation, and "bic" for information criterion
n.foldsif tuning = "cv", positive integer number of folds
penaltyif tuning = "bic", penalty multiplier between 0 and 1; if penalty = NULL, it is set to 1/(1+exp(dim(x)[1])/dim(x)[2]))
path.lengthpositive integer number of regularisation parameter values to consider; a sequence is generated automatically based in this value
whether to perform adaptive thresholding of VAR parameter estimator with threshold
maximum number of descent steps, by default depends on var.order; applicable when method = "lasso"
numerical tolerance for increases in the loss function; applicable when method = "lasso"
number of cores to use for parallel computing, see makePSOCKcluster; applicable when method = "ds"
Further information can be found in Barigozzi, Cho and Owens (2024+).
Barigozzi, M., Cho, H. & Owens, D. (2024+) FNETS: Factor-adjusted network estimation and forecasting for high-dimensional time series. Journal of Business & Economic Statistics (to appear).
Owens, D., Cho, H. & Barigozzi, M. (2024+) fnets: An R Package for Network Estimation and Forecasting via Factor-Adjusted VAR Modelling. The R Journal (to appear).
library(fnets)
set.seed(123)
n <- 500
p <- 50
idio <- sim.var(n, p)
x <- idio$data
fv <- fnets.var(x,
n.cores = 2
)
Run the code above in your browser using DataLab