Solved – VAR MODEL: Error in solve.default(Sigma) : system is computationally singular: reciprocal condition number

I am using R vars package to implement VAR model in a multivariate time series model. I tried to run:

VAR(foo_ts, p = 6)

but I was getting this error message:

Error in solve.default(Sigma) :
system is computationally singular: reciprocal condition number = 0

foo_ts is a time series data.

I have tried to adapt examples in stackexchange and stackoverflow but have not been successful in running the VAR model. I have successfully run the VAR model on other datasets but not on foo_ts. Any help will be appreciated.

Your time series is too short to fit that many parameters. Recall that, in a VAR(p) model begin{equation*} x_t = d + A_1 x_{t-1} + A_2 x_{t-2} + dots + A_p x_{t-p} + epsilon_t, end{equation*} each parameter matrix $A_i$ will have dimension $ktimes k$, where $k$ is the number of parameters. Estimation simply procedes by OLS to each equation of the VAR model. That means you will have $1+ktimes p$ parameters per equation (assuming $d$ for the deterministic component is just a constant). In your case, $p=6$ and there are $k=8$ variables (although two of these appear to be identically zero and hence not very useful).

Hence, you fit 49 coefficients for each equation, but only appear to have $n=21$ observations. As is well-known, the $X'X$ matrix of the OLS estimator will not be invertible when $n$ is smaller than the number of regressors.

Similar Posts:

Rate this post

Leave a Comment