<p>According to page 6 of <a href="https://cran.r-project.org/web/packages/vars/vars.pdf" rel="nofollow noreferrer">the documentation for <em>vars</em></a>, the Cholesky decomposition matrix is lower triangular:</p>

<blockquote>
  <p>The long-run impact matrix is the lower-triangular Choleski decomposition of the above matrix and the contemporaneous impact
  matrix is equal to:</p>
  
  <p><span class="math-container">$$(I_K − A_1 − \dots − A_p)Q$$</span></p>
  
  <p>where <span class="math-container">$Q$</span> assigns the lower-triangular Cholesky decomposition.</p>
</blockquote>

<p>In the theoretical literature, Cholesky factorization is traditionally defined as lower-triangular; that is, as <span class="math-container">$A = L L^{T}$</span>. There is a function is base R, <em>chol()</em>, that returns the upper-triangular Cholesky decomposition of a matrix <span class="math-container">$X = R^{T}R$</span>.</p>

CC BY-SA 4.0
2018-10-24T19:14:58.247Z
2018-10-24T19:50:03.963Z
2018-10-24T19:50:03.963Z
Kenneth Rios
<p>I'd like to know if, when running a VAR model in R (package "vars"), the cholesky decomposition matrix is upper triangular (so I should order my variables from more endogenous to less endogenous), or lower triangular (so I should order my variables from less endogenous to more endogenous).</p>

<econometrics><r>
Cholesky Decomposition in R package "vars"
Pedro Augusto
# Cholesky Decomposition in R package "vars"

(Asked by: username_0 on 2018-10-24)

I'd like to know if, when running a VAR model in R (package "vars"), the cholesky decomposition matrix is upper triangular (so I should order my variables from more endogenous to less endogenous), or lower triangular (so I should order my variables from less endogenous to more endogenous).

**Tags:** econometrics, r


---

## 1 answers

### Answer by username_1 on 2018-10-24. Score: 2 | Accepted answer

According to page 6 of [the documentation for *vars*](https://cran.r-project.org/web/packages/vars/vars.pdf), the Cholesky decomposition matrix is lower triangular:

> The long-run impact matrix is the lower-triangular Choleski decomposition of the above matrix and the contemporaneous impact
> matrix is equal to:
>
> $$(I\_K − A\_1 − \dots − A\_p)Q$$
>
> where $Q$ assigns the lower-triangular Cholesky decomposition.

In the theoretical literature, Cholesky factorization is traditionally defined as lower-triangular; that is, as $A = L L^{T}$. There is a function is base R, *chol()*, that returns the upper-triangular Cholesky decomposition of a matrix $X = R^{T}R$.


---

