Skip to content

ENH: large sparse VAR #2933

Open
Open

Description

@josef-pkt

question on mailing list for sparse VAR
https://groups.google.com/d/msg/pystatsmodels/NWurUtjX9Qg/98xpoTIuBQAJ

reference
Davis, Richard A., Pengfei Zang, and Tian Zheng. 2015. “Sparse Vector Autoregressive Modeling.” Journal of Computational and Graphical Statistics 0 (ja): 1–53. doi:10.1080/10618600.2015.1092978.
(ahead of print)

some references that I downloaded, but I only read part of Basu/Michailidis 2015

Basu, Sumanta, and George Michailidis. 2015. “Regularized Estimation in Sparse High-Dimensional Time Series Models.” The Annals of Statistics 43 (4): 1535–67. doi:10.1214/15-AOS1315.

Dowell, J., and P. Pinson. 2016. “Very-Short-Term Probabilistic Wind Power Forecasts by Sparse Vector Autoregression.” IEEE Transactions on Smart Grid 7 (2): 763–70. doi:10.1109/TSG.2015.2424078.

Melnyk, Igor, and Arindam Banerjee. 2016. “Estimating Structured Vector Autoregressive Model.” arXiv:1602.06606 [Math, Stat], February. http://arxiv.org/abs/1602.06606.

Nicholson, William B., Jacob Bien, and David S. Matteson. 2014. “Hierarchical Vector Autoregression.” arXiv:1412.5250 [Stat], December. http://arxiv.org/abs/1412.5250.

Nicholson, William, David Matteson, and Jacob Bien. 2015. “VARX-L: Structured Regularization for Large Vector Autoregressions with Exogenous Variables.” arXiv:1508.07497 [Stat], August. http://arxiv.org/abs/1508.07497.

Wong, Kam Chung, Ambuj Tewari, and Zifan Li. 2016. “Regularized Estimation in High Dimensional Time Series under Mixing Conditions.” arXiv:1602.04265 [Cs, Stat], February. http://arxiv.org/abs/1602.04265.

Activity

  1. josef-pkt commented on May 12, 2016

    @josef-pkt
    MemberAuthor

    (comments also posted to the mailing list)

    I read their 2012 Arxiv version because it has nicer formatting for reading on an ipad.

    I didn't realize before that they were negative on LASSO, nice :)
    (typical biased results for parameter estimation by LASSO also occurs in a time series context.)

    a few comments:

    Their distinction between Lasso-SS and Lasso-LL is more like OLS versus GLS. In Lasso-SS they don't even allow for different variances across equations, AFAICS. LL is not full MLE it's iterative GLS.

    I don't know how easy it is to implement the partial spectral coherence. My attempts at multivariate fft 6,7 years ago were not successful, but that's a long time ago and scipy has changed in the meantime. nipy.nitime was specialized on frequency domain statistics and coherence (and Granger causality in frequency domain, IIRC).
    (One computational worry I have with this is that it needs to be calculated for many frequencies, same as the number of time periods if I read it correctly.)

    To calculate a large sparse VAR, I think going the route through single equation OLS loops will be the easiest, and it will be relatively easy to plug in different forms of penalization or 1st stage variable selection.
    Both the Davis et al and the Basu Michailidis paper do something like this, either explicitly or implicitly.

    Lasso is not very good at parameter estimation and variable selection in settings like this, but I guess it could be a good devise for the initial screening, essentially as alternative to the PSC.

    SCAD or adaptive Lasso penalization wouldn't have the same bias/distortion problems as plain Lasso, and I would expect those to be competitive with any "ad-hoc" variable selection.

    In terms of implementation:

    If we can hold the entire array of regressors for a single equation in memory, then we can use existing tools, that just use all regressors or loop over them, and we have the helper function to build the full regressor matrix with lags in one step.
    In this case one tricky part will be to keep track of the indices for what is in and what is out.

    If we cannot fit the full regressor aray in memory, then we need to create it on the fly, which makes housekeeping more difficult and existing models would need a callback instead of an array of explanatory variables.

    As I mentioned before the VAR postestimation shouldn't have inherent memory problems, but the classes might not be designed to work without full data arrays, I haven't checked this.

    Davis et al working paper doesn't mention selection in the error covariance matrix and seems to use the full covariance matrix. Basu and Michailidis have a section on correlation thresholding that I didn't read. There is nothing in statsmodels for that yet, but AFAIK scikit-learn would have several functions for it.

    Aside:
    Before this I only knew of factor VAR model for the sparse case. They are not sparse in individual effects, but they dynamic is driven by a few factors (principal components). This is more appropriate if there are just a few shocks/driving factors in the environment that affect all individual pieces, like a recession or boom in a MacroEconomy, or a drought, or not enough snow in the environment.
    The sparsity in the above case will be more appropriate for spatial and network effects.
    (Wasn't there a request for panel or spatial VAR?)


    additional:

    Splitting up into single equation estimation will not work with cross-equation restrictions.

    AFAICS: FGLS Wald inference with constraints on parameters of individual equations can also be done by single equations, because of the Kronecker or block structure of the full regressor matrix.
    (I didn't verify the math.)

    We can do partial granger noncausality test by testing blocks of parameters in a single equation with all regressors. If we have names for the regressors, the wald_test_terms can do this automatically.
    It means I should review VAR-granger causality to see how it does the conditioning, i.e. what is conditioned upon in the joint granger causality test.

    1. sets of regressors that don't granger cause the current variable - works with single equation
    2. one regressor that does not granger cause a group of or all other variables, needs cross-equation test.
    3. a mix of the first two, which is, I think, what the current VAR granger causality test does.

    Those are partial test (having removed the effect of other regressors). An other kind of test would be conditioning only on subsets. (not so interesting, that's more like type 2 ANOVA.)

  2. josef-pkt commented on May 12, 2016

    @josef-pkt
    MemberAuthor

    Stata allows for constraints in var and have an example with zero constraints.
    They don't specify how they estimate and just mention SUR, which I guess means that they use a full version that would require a large amount of or too much memory with large systems of equations.
    They don't allow error covariance restriction in var, those are only in svar.

  3. josef-pkt commented on May 12, 2016

    @josef-pkt
    MemberAuthor

    Ping @yogabonito Did you start to look at how VAR is set up?

    It might be useful to start with a single equation of a VAR/VECM both because we don't have anything yet that directly supports a single equation and because it looks like a good stepping stone for modelling the full system.

  4. yogabonito commented on May 13, 2016

    @yogabonito
    Contributor

    Yes, I think now I have an overview of the VAR-related classes. This week I am going through VECM-theory. Next week, I plan to take a closer look on your PRs as well as VECM-implementations outside the Python-world (JMulTi, R, Stata).

  5. josef-pkt commented on May 14, 2016

    @josef-pkt
    MemberAuthor

    another reference, not read
    looks like using spatial or other prior structure to get network relationship between large number of time series
    Schweinberger, Michael, Sergii Babkin, and Katherine Ensor. 2015. “High-Dimensional Multivariate Time Series With Additional Structure.” arXiv:1510.02159 [Stat], October. http://arxiv.org/abs/1510.02159.

  6. yogabonito commented on May 16, 2016

    @yogabonito
    Contributor

    Thanks Josef, for these resources. I'm afraid I won't be able read them all in detail before coding starts. But I will try to get an overview such that I know were to find the information needed during the coding phase.

  7. josef-pkt commented on May 16, 2016

    @josef-pkt
    MemberAuthor

    @yogabonito I don't think you need or should include large sparse VAR in your project, there is enough work without it.
    But if you start with or add support for a single equation of VAR and VECM, then it will be useful for your project and might add large parts of what will be needed for large sparse VAR.
    (single dependent variable, but all the lags of the variables as regressors.)

  8. josef-pkt commented on Aug 11, 2016

    @josef-pkt
    MemberAuthor

    parking another reference and link to related literature (factor models)

    Bailey, Natalia, Sean Holly, and M. Hashem Pesaran. 2016. “A Two-Stage Approach to Spatio-Temporal Analysis with Strong and Weak Cross-Sectional Dependence.” Journal of Applied Econometrics 31 (1): 249–80. doi:10.1002/jae.2468.

    first stage is factor model to remove strong cross-sectional dependence
    second stage is spatial/sparse VAR. (spatial here includes the spatial weight matrix)
    (I didn't read the article. There is a lot more in this area, but I didn't skim much of the literature)
    advantage of 2-stage: once we have the two models, it will be relatively easy to combine.

  9. josef-pkt commented on Sep 23, 2016

    @josef-pkt
    MemberAuthor

    "lowering requirements"
    The following article looks relatively simple, but I haven't tried yet to figure out all the computational details. Uses only VAR(1) using OLS estimate based on shrinkage covariance matrix for normal equations. Emphasis is on sparse network selection. No reestimation of parameters with efficient SUR. Non-zero partial correlations are selected by local FDR (that Kerby already implemented).
    Does better than LASSO or Ridge in edge selection.

    Opgen-Rhein, Rainer, and Korbinian Strimmer. 2007. “Learning Causal Networks from Systems Biology Time Course Data: An Effective Model Selection Procedure for the Vector Autoregressive Process.” BMC Bioinformatics 8 (S2): S3. doi:10.1186/1471-2105-8-S2-S3.

    related #3197 for regularized covariance or correlation estimation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions