# Omitting certain time periods in VAR

I am using a vector autoregression with a monthly lag, and wish to not include certain months, as they are outliers in my analysis and may distort findings. Is estimating such a VAR (using OLS, then identifying the structural shocks by Cholesky decomposition and another method) with missing dates permissible?

• So in order not to mess up the time dependence, would I need to feed that into the program? Or just create rows with time periods containing blanks? May 10, 2019 at 9:22

You can do this, but be careful not to mess up the time dependence. You cannot just delete one or more observations from your time series. But you can construct your design matrix of lagged variables and append the dependent variables as additional columns. Then mark the outliers and delete all rows with outliers (they will be in different rows for different columns). Then split the additional columns from the rest of the columns, these will be your dependent variable and the design matrix. You can then use OLS and other least-squares based estimation methods.

Illustration with a bivariate VAR(1) for time series $$x$$ and $$y$$:
Suppose $$x^\top=(x_1,x_2,NA,x_4,x_5)$$ and $$y^\top=(y_1,y_2,y_3,y_4,y_5)$$.
Construct a matrix $$A:=[x_{-1};y_{-1};x_{-5};y_{-5}]$$: $$A=\begin{pmatrix} x_2 & y_2 & x_1 & y_1 \\ NA & y_3 & x_2 & y_2 \\ x_4 & y_4 & NA & y_3 \\ x_5 & y_5 & x_4 & y_4 \\ \end{pmatrix}.$$ Delete all rows containing NA: $$A'=\begin{pmatrix} x_2 & y_2 & x_1 & y_1 \\ x_5 & y_5 & x_4 & y_4 \\ \end{pmatrix}.$$ Your dependent variables are the first two columns of the $$A'$$ matrix, and your regressors are the last two columns of the $$A'$$ matrix: $$x'=A_{\cdot 1}$$, $$y'=A_{\cdot 2}$$, $$x\text{lag}'=A_{\cdot 3}$$, $$y\text{lag}'=A_{\cdot 4}$$. Now you can estimate the bivariate VAR(1) by, say, equation-by-equation OLS using the regular OLS routines such as lm in R. The first equation would be lm(x~xlag+ylag), the second lm(y~xlag+ylag).

Of course, in this example the sample is too small when adjusted for NAs, but with more realistic samples sizes it should work fine.

• Would this work for a VAR with more lags, not just a VAR(1)? May 11, 2019 at 14:46
• @Student, Sure! The $A$ and $A'$ matrices would have additional columns. For VAR(2), there would be two more columns (one for lag 2 of $x$, one for lag 2 of $y$) and one fewer row (the first row of the current $A$ and $A'$ matrices would not be there). May 11, 2019 at 14:51
• I see what you did now, it's clear. Thanks. May 11, 2019 at 18:02
• @Student, you are welcome! May 11, 2019 at 18:56
• I do have a further question. Essentially, the unit of time in my analysis is a month from 2002 to 2014, and so the monthly VAR makes sense. From 2015 to 2018, the unit of time is now eight weeks. Is it possible to run such a VAR? At first, the lag is monthly, but now, it is every eight weeks. May 11, 2019 at 19:09