Skip to content

Implementation of the FNETS methodology proposed in Barigozzi, Cho and Owens (2024) for network estimation and forecasting of high-dimensional time series

Notifications You must be signed in to change notification settings

haeran-cho/fnets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fnets

Contains methods for network estimation and forecasting for high-dimensional time series under a factor-adjusted VAR model. See

FNETS: Factor-adjusted network estimation and forecasting for high-dimensional time series, to appear in the Journal of Business & Economic Statistics

by Matteo Barigozzi, Haeran Cho and Dom Owens arXiv:2201.06110 for details of the methodology, and

fnets: An R Package for Network Estimation and Forecasting via Factor-Adjusted VAR Modelling, to appear in The R Journal

by Dom Owens, Haeran Cho and Matteo Barigozzi arXiv:2301.11675 for further information about the usage of the R package.

Installation

To install fnets from CRAN:

install.packages("fnets")

To install the latest version from GitHub:

devtools::install_github("https://github.com/haeran-cho/fnets")

Usage

We can generate an example dataset used in the above paper for simulation studies, by separately generating the factor-driven common component and the idiosyncratic VAR process as

set.seed(123)
n <- 500
p <- 50
common <- sim.unrestricted(n, p)
idio <- sim.var(n, p)
x <- common$data + idio$data

Fit a factor-adjusted VAR model with q = 2 factors and lasso for VAR transition matrix estimation

out <- fnets(x, q = 2, var.order = 1, var.method = "lasso", do.lrpc = FALSE)

Plot the Granger network induced by the estimated VAR transition matrices:

plot(out, type = "granger", display = "network")

Estimate and plot the partial-correlation and long-run partial correlation-based networks:

plrpc <- par.lrpc(out)
out$lrpc <- plrpc
out$lrpc.method <- 'par'
plot(out, type = "lrpc", display = "heatmap")

Estimate the (long-run) partial correlation-based networks directly using fnets:

out <- fnets(x, q = 2, var.order = 1, var.method = "lasso", do.lrpc = TRUE)

Forecast n.ahead steps:

pr <- predict(out, n.ahead = 1, common.method = "restricted")
pr$forecast

About

Implementation of the FNETS methodology proposed in Barigozzi, Cho and Owens (2024) for network estimation and forecasting of high-dimensional time series

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published