Questions tagged [vector-auto-regression]

Vector Autoregression (VAR) is a multivariate time series forecasting method used when two or more time series influence each other and where each variable's predictors include past observations of itself and past observations of all other variables. If your question concerns theoretical topics on VAR or practical topics which are not about implementation you might want to ask the question on https://stats.stackexchange.com.

46 questions
8
votes
3 answers

Cannot fix the lack of memory problem in running "pvargmm"

My computer uses a CPT of Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz. Also my RAM memory size is 16 GB. When I run the following panel VAR model "pvargmm" in…
Eric
  • 528
  • 1
  • 8
  • 26
7
votes
1 answer

How to use a lasso with the Vars package?

I'm trying to analyze a high dimensional data set (31 variables, 1100 observations) through a penalized vector autoregression. Since I'm using the techniques introduced by Diebold et. al (2019) to build a network of connectedness through variance…
6
votes
2 answers

Why ImportError: cannot import name 'AutoReg' from 'statsmodels.tsa.ar_model' occuring?

I am trying to do MLE regression using AR(p) by importing the module from statsmodels.tsa.ar_model import AutoReg, ar_select_order, but this ImportError keeps coming. How to solve this? Is there any other way I can do Autoregression in Python?
4
votes
1 answer

How to do granger causality test after panel vector autoregression (pVAR) in R?

How to do granger causality test after running a panel vector autoregression in R (using the panelvar package)? In order to run the panel VAR, one could do the following: library(plm) library(panelvar) set.seed(12345) x = rnorm(240) z = x +…
Miranda
  • 148
  • 13
3
votes
0 answers

R: IRFs in a SVAR model, can't display specified model

I am doing a SVAR (structural vector auto regression) analysis in which I want to plot IRFs (impulse response functions). My time series have length 137 and I only use 3 variables, furthermore I select 1 lag when specifying the VAR model. Specifying…
ArOk
  • 193
  • 7
2
votes
0 answers

Vector autoregressive models with custom lags

I am trying to apply vector autoregression to my data using statsmodels package. This package has a lot of tools for univariate time-series modeling, including statsmodels.tsa.ar_model.AutoReg() method that accepts a list of custom lags. For a…
Mikhail Genkin
  • 3,247
  • 4
  • 27
  • 47
2
votes
1 answer

'VARResults' object has no attribute 'y'

I'm trying to get the run tutorial on kats multi-variete time series model forecasting running but I'm running into an error when running m.predict Here's the code which can also be found on their tutorial page. try: # If running on Jupyter …
2
votes
0 answers

How to store Newey West standard errors in VAR object in R?

As I have serial correlation in my residuals up to a very high number of lags, I want to use Newey West standard errors to overcome the serial correlation. Based on the VAR my goal is to conduct forecast error variance decompositions. Does anyone…
JJ1214
  • 31
  • 2
2
votes
0 answers

Vector autoregressive (VAR) model fitting with different lag operator

I am a Master 2 student in computational neuroscience. I'm at the very end of my analysis and I have a problem with the application of a VAR model (vector autoregressive model). It is a rather complex problem to solve and it concerns the test of…
2
votes
1 answer

Modifying a statsmodels graph

I am following the statsmodels documentation here: https://www.statsmodels.org/stable/vector_ar.html I get to the part at the middle of the page that says: irf.plot(orth=False) which produces the following graph for my data: I need to modify the…
Saeed
  • 1,848
  • 1
  • 18
  • 26
2
votes
1 answer

"object not found" in foreach loop

I am running vector autoregression models in R using vars library and I want to utilize the foreach function to run models in parallel but it yields an error saying Error in { : task 1 failed - "object 'exogen.train' not found" The code runs fine…
T. J.
  • 90
  • 1
  • 6
1
vote
1 answer

Error when adding fourth regressor to VAR - R

I am building a vector autoregressive model and got stuck on some problem. My regressors are some sentiment and financial values. For testing robustness I wanted to add multiple other economic variables to the model. The problem I encounter is: when…
1
vote
1 answer

LinAlgError: 6-th leading minor of the array is not positive definite when running VAR model on list of dataframes

I have a generated a list of dataframes called new_new_dfs that all have this general format, with some variation in the number of Coupons and the number of rows: They are columns of differenced Single Month Mortality (SMM) for bond securities…
hulio_entredas
  • 675
  • 1
  • 12
1
vote
0 answers

Stargazer VAR model summary

i have lots of trouble with the export of a vector autoregression model with R, more specifically with the Stargazer package. Model1 <- VAR(v1, p = 7, type = "const", season = NULL, exog = NULL) sum <- summary(Model1) sum gives the desired output…
reCaptcha
  • 39
  • 6
1
vote
1 answer

How to forecast with lagged external regressors using fable::VAR

I'd like to use lagged external regressors in my VAR forecast. Using the VAR() function from the fable package, I am able to fit a model, but I can't use it to forecast, as I return NAs for the dependent variables. My reprex follows examples from…
1
2 3 4