BigVAR

所属分类:时间序列预测
开发工具:R
文件大小:311KB
下载次数:0
上传日期:2022-10-26 02:08:20
上 传 者sh-1993
说明:  多变量时间序列的降维方法
(Dimension Reduction Methods for Multivariate Time Series)

文件列表:
BigVAR-manual.pdf (138366, 2022-10-26)
BigVAR (0, 2022-10-26)
BigVAR\DESCRIPTION (912, 2022-10-26)
BigVAR\NAMESPACE (1037, 2022-10-26)
BigVAR\NEWS (459, 2022-10-26)
BigVAR\R (0, 2022-10-26)
BigVAR\R\BigVAR.R (2958, 2022-10-26)
BigVAR\R\BigVARAlgorithms.R (17876, 2022-10-26)
BigVAR\R\BigVARFitFun.R (13755, 2022-10-26)
BigVAR\R\BigVARObjectClass.R (72436, 2022-10-26)
BigVAR\R\BigVARSupportFunctions.R (43835, 2022-10-26)
BigVAR\R\RcppExports.R (5579, 2022-10-26)
BigVAR\R\data.R (753, 2022-10-26)
BigVAR\data (0, 2022-10-26)
BigVAR\data\Generator.RData (212, 2022-10-26)
BigVAR\data\Y.RData (2421, 2022-10-26)
BigVAR\inst (0, 2022-10-26)
BigVAR\inst\include (0, 2022-10-26)
BigVAR\inst\include\BigVAR.h (183, 2022-10-26)
BigVAR\man (0, 2022-10-26)
BigVAR\man\A.Rd (568, 2022-10-26)
BigVAR\man\BigVAR-class.Rd (2795, 2022-10-26)
BigVAR\man\BigVAR.Rd (2813, 2022-10-26)
BigVAR\man\BigVAR.est-methods.Rd (957, 2022-10-26)
BigVAR\man\BigVAR.results-plot-methods.Rd (582, 2022-10-26)
BigVAR\man\BigVAR.results.Rd (3641, 2022-10-26)
BigVAR\man\MultVarSim.Rd (984, 2022-10-26)
BigVAR\man\SparsityPlot.BigVAR.results-methods.Rd (870, 2022-10-26)
BigVAR\man\VARXFit.Rd (2028, 2022-10-26)
BigVAR\man\VARXForecastEval.Rd (2221, 2022-10-26)
BigVAR\man\VarptoVar1MC.Rd (937, 2022-10-26)
BigVAR\man\Y.Rd (368, 2022-10-26)
BigVAR\man\constructModel.Rd (6562, 2022-10-26)
BigVAR\man\cv.BigVAR-methods.Rd (1014, 2022-10-26)
BigVAR\man\plot.BigVAR-methods.Rd (589, 2022-10-26)
BigVAR\man\predict-methods-BigVAR.results.Rd (879, 2022-10-26)
BigVAR\man\show-methods-BigVAR.results.Rd (661, 2022-10-26)
BigVAR\man\show-methods.Rd (780, 2022-10-26)
... ...

BigVAR ====== Tools for modeling sparse high-dimensional multivariate time series # R Package For a demonstration of the package's capabilities, see the recently updated [BigVAR Tutorial](http://www.wbnicholson.com/BigVAR.html), the [Shiny App](http:/bigvar.ddns.net:3838/BigVAR/), or the slightly out of date user guide available [on Arxiv](https://arxiv.org/abs/1702.07094). Note: This package utilizes C++11, so it requires a compiler with C++11 support (which should include most modern compilers) and a later version of R (version 3.1 is the oldest that I can confirm works). To install the development version of BigVAR, after installing the devtools package, run the following commands ```R library(devtools) install_github("wbnicholson/BigVAR/BigVAR") ``` The stable version is available on [cran](https://cran.r-project.org/package=BigVAR). If you experience any bugs or have feature requests, contact me at wbn8@cornell.edu. # Python Package A minimalist Python implementation (partially inspired by this [abandoned effort](https://github.com/josh-alley/BigVARPython)) has been released. Currently, it only has the capability to fit Basic or Elastic Net penalty structures. Feel free to suggest other functionality or submit pull requests. ## Installation In order to install the Python implementation, clone the repository, navigate to the python directory and run ```bash pip install -e . ``` ### Usage An example script is below ```python import numpy as np from BigVAR.BigVARSupportFunctions import MultVARSim, CreateCoefMat from BigVAR.BigVARClass import BigVAR,rolling_validate # example coefficient matrix k=3;p=4 B1=np.array([[.4,-.02,.01],[-.02,.3,.02],[.01,.04,0.3]]) B2=np.array([[.2,0,0],[0,.3,0],[0,0,0.13]]) B=np.concatenate((B1,B2),axis=1) B=np.concatenate((B,np.zeros((k,2*k))),axis=1) A=CreateCoefMat(B,p,k) Y=MultVARSim(A,p,k,0.01*np.identity(3),500) VARX={} # construct BigVAR object: # Arguments: # Y T x k multivariate time series # p: lag order # penalty structure (only Basic and BasicEN supported) # granularity (depth of grid and number of gridpoints) # T1: Start of rolling validation # T2: End of rolling validation # alpha: elastic net alpha candidate # VARX: VARX specifications as dict with keys k (number of endogenous series), s (lag order of exogenous series) mod=BigVAR(Y,p,"Basic",[50,10],50,80,alpha=0.4,VARX=VARX) res=rolling_validate(mod) # coefficient matrix res.B # out of sample MSFE res.oos_msfe #optimal lambda res.opt_lambda ```

近期下载者

相关文件


收藏者