VAR Model
by Professor Throckmorton
for Time Series Econometrics
W&M ECON 408/PUBP 616
Slides
Introduction¶
A is a system of linear equations that can be compactly expressed with vector/matrix notation
where bold indicates a vector/matrix, e.g., has size and are square matrices
Now we assume and , which has size
is the covariance matrix and must be a symmetric positive definite matrix (i.e., this is analogous to a scalar SD/variance being positive)
A is a system of linear equations where each variable is regressed on of its own lags as well as lags of each other variable
Growth Model Example¶
Consider the following (nonlinear) growth model
Capital accumulation and technology are (linear) first-order difference questions, and technology is specifically an AR(1)
Investment could be exogenous, or endogenous to output, e.g., where is the savings rate.
The production function is nonlinear, but we can linearize it with natural log, e.g.,
Natural log and percent change¶
It would be nice if all the units of all variables were something easily interpretable, e.g., in percent changes
Suppose each variable is covariance stationary and has a constant long-run mean (a.k.a. steady state or long-run equilibrium). For any variable in the model, , define its mean as .
Note that (for more detail, see natural logs and percent changes)
This approximation works so long as the percent changes are relatively small, e.g., 5% or less considering observing a 5% GDP growth rate would be far in the right tail of the distribution of growth rates for most countries.
Linearization¶
Recall that natural log converts exponents to multiplication and multiplication to addition (awesome!)
Consider log output, .
Suppose that each variable has a long-run mean/steady state, then .
Question: How do we express those variables as percent change?
Answer: Subtract the steady state equation from the dynamic equation (note that )
Now is already linear, but the variables are not expressed as percent changes.
Subtract the steady-state equation from the dynamic equation
Multiply each term by one in the form of using the appropriate variable for each term.
Now it’s linear and all variables are expressed as percent changes.
Linear Growth Model¶
The linear growth model with endogenous investment
This is a linear system of 4 dynamic equations and 4 variables (i.e., unknowns), that we can map to a VAR(1),
where
Covariance Matrix¶
In a VAR(), assume and
In the simple linear growth model, there is only one innovation/shock.
which clearly satisfies since all elements are zero or
As for the covariance matrix
Likelihood Function¶
Since a VAR() is a linear system of equations where the innovations are i.i.d. normally distrubted, the likelihood function is a multivariate normal density function. Maximizing the likelihood is the same as maximizing the log-likelihood,
It turns out that the ordinary least squares (OLS) estimates are the maximum likelihood estimates (MLE) of the parameters in a VAR().
You can also use estimated residuals, , from OLS to get the MLE of the covaraince matrix, .
Information criterion are used to select the optimal number of lags, e.g., Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC).
Structural VAR¶
A structural VAR() is given by
where allows for contemporaneous relationships between variables, e.g., if there is an aggregate demand shock, then both GDP growth and the inflation rate might increase simultaneously.
Let’s assume , i.e., the multivariate standard normal distribution
There are variables, each coefficient matrix are square matrices, while , , and are column vectors.
Reduced-form VAR¶
Pre-multiplying by the inverse of yields a reduced-form model
where is a column vector, are matrices
Note: , so just remains on the left-hand side
is a vector of shocks that has a multivariate normal distribution with zero mean and variance-covariance matrix
Since the shocks are possibly correlated across variables, becomes an vector of endogenous variables.
Estimation¶
Estimate a reduced-form VAR()'s parameters with ordinary least squares (OLS) estimator.
However, there might be contemporaneous relationships between variables, i.e., shocks/residuals to different variables can be correlated, so some restriction on the covariance matrix is necessary for identification of a structural VAR().
Given OLS estimate of covariance matrix, , “structural” shocks are often identified recursively, e.g., with a Cholesky decomposition, , which ensures that is a lower-triangular matrix.
The implication is that the ordering of the variables matter in a structural VAR, so researchers must justify the ordering as part of their identification strategy.
OLS Estimates¶
A reduced-form VAR() can be written compactly as
which is a multivariate linear regression where everything in bold is a matrix defined as
Parameters estimates are OLS, .
Residual estimates are and the covariance matrix is
With in hand, the structural shocks are identified by a Cholesky decomposition,
Recursive Identification¶
Suppose the data is 1. Output (), 2. Inflation (), and 3. Interest Rate ()
Recursive identification, e.g., using a Cholesky decomposition, imposes that
Output does not respond immediately to other variables’ shocks
Inflation may respond immediately to output shocks, but does not respond to interest rate shocks
Interest Rate may respond immediately to both output and inflation shocks
This ordering reflects these beliefs or theory
Firms and consumers don’t instantly change output/expenditure output responds slowly.
Prices are sticky inflation adjusts with a lag.
Central banks move fast interest rates adjust quickly to new information.
Cholesky Decomposition Example¶
Here’s an example of a positive definite matrix
Our goal is to find a lower triangular matrix, , such that . The Cholesky factor is
import numpy as np
# Define the symmetric, positive definite matrix
Omega = np.array([
[4, 12, -16],
[12, 37, -43],
[-16, -43, 98]
])
print(Omega)[[ 4 12 -16]
[ 12 37 -43]
[-16 -43 98]]
# Compute the Cholesky factor (lower triangular matrix L)
L = np.linalg.cholesky(Omega)
# Print the result
print('L ='); print(L)
print("L L' ="); print(L@L.T)
print('Omega ='); print(Omega)L =
[[ 2. 0. 0.]
[ 6. 1. 0.]
[-8. 5. 3.]]
L L' =
[[ 4. 12. -16.]
[ 12. 37. -43.]
[-16. -43. 98.]]
Omega =
[[ 4 12 -16]
[ 12 37 -43]
[-16 -43 98]]
Verifying