fnets {fnets}R Documentation

Factor-adjusted network estimation

Description

Under a factor-adjusted vector autoregressive (VAR) model, the function estimates the spectral density and autocovariance matrices of the factor-driven common component and the idiosyncratic VAR process, the impulse response functions and common shocks for the common component, and VAR parameters, innovation covariance matrix and long-run partial correlations for the idiosyncratic component.

Usage

fnets(
  x,
  center = TRUE,
  fm.restricted = FALSE,
  q = c("ic", "er"),
  ic.op = NULL,
  kern.bw = NULL,
  common.args = list(factor.var.order = NULL, max.var.order = NULL, trunc.lags = 20,
    n.perm = 10),
  var.order = 1,
  var.method = c("lasso", "ds"),
  var.args = list(n.iter = NULL, n.cores = 1),
  do.threshold = FALSE,
  do.lrpc = TRUE,
  lrpc.adaptive = FALSE,
  tuning.args = list(tuning = c("cv", "bic"), n.folds = 1, penalty = NULL, path.length =
    10)
)

Arguments

x

input time series each column representing a time series variable; it is coerced into a ts object

center

whether to de-mean the input x

fm.restricted

whether to estimate a restricted factor model using static PCA

q

Either the number of factors or a string specifying the factor number selection method; possible values are:

"ic"

information criteria-based methods of Alessi, Barigozzi & Capasso (2010) when fm.restricted = TRUE or Hallin and Liška (2007) when fm.restricted = FALSE

"er"

eigenvalue ratio of Ahn and Horenstein (2013) when fm.restricted = TRUE or Avarucci et al. (2022) when fm.restricted = FALSE

see factor.number.

ic.op

choice of the information criterion penalty, see factor.number for further details

kern.bw

a positive integer specifying the kernel bandwidth for dynamic PCA; by default, it is set to floor(4 *(dim(x)[2]/log(dim(x)[2]))^(1/3))). When fm.restricted = TRUE, it is used to compute the number of lags for which autocovariance matrices are estimated

common.args

a list specifying the tuning parameters required for estimating the impulse response functions and common shocks. It contains:

factor.var.order

order of the blockwise VAR representation of the common component. If factor.var.order = NULL, it is selected blockwise by Schwarz criterion

max.var.order

maximum blockwise VAR order for the Schwarz criterion

trunc.lags

truncation lag for impulse response function estimation

n.perm

number of cross-sectional permutations involved in impulse response function estimation

var.order

order of the idiosyncratic VAR process; if a vector of integers is supplied, the order is chosen via tuning

var.method

a string specifying the method to be adopted for idiosyncratic VAR process estimation; possible values are:

"lasso"

Lasso-type l1-regularised M-estimation

"ds"

Dantzig Selector-type constrained l1-minimisation

var.args

a list specifying the tuning parameters required for estimating the idiosyncratic VAR process. It contains:

n.iter

maximum number of descent steps, by default depends on var.order; applicable when var.method = "lasso"

n.cores

number of cores to use for parallel computing, see makePSOCKcluster; applicable when var.method = "ds"

do.threshold

whether to perform adaptive thresholding of all parameter estimators with threshold

do.lrpc

whether to estimate the long-run partial correlation

lrpc.adaptive

whether to use the adaptive estimation procedure

tuning.args

a list specifying arguments for selecting the tuning parameters involved in VAR parameter and (long-run) partial correlation matrix estimation. It contains:

tuning

a string specifying the selection procedure for var.order and lambda; possible values are: "cv" for cross validation, and "bic" for information criterion

n.folds

if tuning = "cv", positive integer number of folds

penalty

if tuning = "bic", penalty multiplier between 0 and 1; if penalty = NULL, it is set to 1/(1+exp(dim(x)[1])/dim(x)[2]))

by default

path.length

positive integer number of regularisation parameter values to consider; a sequence is generated automatically based in this value

Details

See Barigozzi, Cho and Owens (2024+) for further details. List arguments do not need to be specified with all list components; any missing entries will be filled in with the default argument.

Value

an S3 object of class fnets, which contains the following fields:

q

number of factors

spec

if fm.restricted = FALSE a list containing estimates of the spectral density matrices for x, common and idiosyncratic components

acv

a list containing estimates of the autocovariance matrices for x, common and idiosyncratic components

loadings

if fm.restricted = TRUE, factor loadings; if fm.restricted = FALSE and q >= 1, a list containing estimators of the impulse response functions (as an array of dimension (p, q, trunc.lags + 2))

factors

if fm.restricted = TRUE, factor series; else, common shocks (an array of dimension (q, n))

idio.var

a list containing the following fields:

beta

estimate of VAR parameter matrix; each column contains parameter estimates for the regression model for a given variable

Gamma

estimate of the innovation covariance matrix

lambda

regularisation parameter

var.order

VAR order

lrpc

see the output of par.lrpc

mean.x

if center = TRUE, returns a vector containing row-wise sample means of x; if center = FALSE, returns a vector of zeros

var.method

input parameter

do.lrpc

input parameter

kern.bw

input parameter

References

Ahn, S. C. & Horenstein, A. R. (2013) Eigenvalue ratio test for the number of factors. Econometrica, 81(3), 1203–1227.

Alessi, L., Barigozzi, M., & Capasso, M. (2010) Improved penalization for determining the number of factors in approximate factor models. Statistics & Probability Letters, 80(23-24):1806–1813.

Avarucci, M., Cavicchioli, M., Forni, M., & Zaffaroni, P. (2022) The main business cycle shock(s): Frequency-band estimation of the number of dynamic factors.

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).

Hallin, M. & Liška, R. (2007) Determining the number of factors in the general dynamic factor model. Journal of the American Statistical Association, 102(478), 603–617.

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).

See Also

predict.fnets, plot.fnets, print.fnets

Examples


out <- fnets(data.unrestricted,
  do.threshold = TRUE,
  var.args = list(n.cores = 2)
)
pre <- predict(out, common.method = "unrestricted")
plot(out, type = "granger", display = "network")
plot(out, type = "lrpc", display = "heatmap")


[Package fnets version 0.1.6 Index]