Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
121 views

Topic 7. VAR Models

The document discusses vector autoregressive (VAR) models, which relate current observations of a variable with past observations of itself and other variables in a system. VAR models allow feedback between variables and are useful for forecasting, establishing causal relationships, and simulating shocks to trace their effects. The document outlines reduced form, recursive, and structural VAR models, explaining their specifications, estimation, and use for inference, forecasting, and evaluating variable interrelationships through Granger causality, impulse response functions, and forecast error decompositions.

Uploaded by

Tuấn Đinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

Topic 7. VAR Models

The document discusses vector autoregressive (VAR) models, which relate current observations of a variable with past observations of itself and other variables in a system. VAR models allow feedback between variables and are useful for forecasting, establishing causal relationships, and simulating shocks to trace their effects. The document outlines reduced form, recursive, and structural VAR models, explaining their specifications, estimation, and use for inference, forecasting, and evaluating variable interrelationships through Granger causality, impulse response functions, and forecast error decompositions.

Uploaded by

Tuấn Đinh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Applied Econometrics for Empirical Research

Topic 7. VAR models


What is a vector autoregressive model?
• VAR model is a multivariate time series model that relates current observations of a
variable with past observations of itself and past observations of other variables in
the system.
• VAR models differ from univariate autoregressive models because they allow
feedback to occur between the variables in the model. For example, we could use
VAR to show how real GDP is a function of policy rate and how policy rate is a
function of real GDP.
Why use VAR models?
Advantages of VAR models
• A systematic but flexible approach for capturing complex real-world behavior.
• Better forecasting performance.
• Ability to capture the intertwined dynamics of time series data.
Some reasons for estimating VAR model
• Because there is no cointegration among the variables in the system.
• To establish causal relationships.
• To simulate shocks to the system and trace out the effects of shocks to the
endogenous variables.
• For forecasting (decomposing shocks to the VAR system).
Three types of VAR models
• There are three broad types of VAR models:

▫ The reduced form

▫ The recursive form

▫ The structural VAR model.


• Reduced form VAR models consider each variable to be a function of
▫ Its own past values (i.e. lags)
▫ The past values of other variables in the model.
• While reduced form models are the simplest of the VAR models, they do come with
disadvantages:
• Contemporaneous variables are not related to one another.
• The error terms will be correlated across equations. This means we cannot
consider what impacts individual shocks will have on the system.
• Recursive VAR models contain all the components of the reduced form model but
also allow some variables to be functions of other concurrent variables. By imposing
these short-run relationship, the recursive model allows us to model structural
shocks.
• Structural VAR models include restrictions that allow us to identify causal
relationships beyond those that can be identified with reduced form or recursive
models. These causal relationships can be used to model and forecast impacts of
individual shocks, such as policy decisions.
An example
• Consider a VAR with 3 endogenous variables: unemployment rate, inflation rate and
interest rate.
• A reduced form VAR(2) model includes the following equations:
𝑈𝑁𝐸𝑀𝑡 = 𝛽10 + 𝛽11 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽12 𝑈𝑁𝐸𝑀𝑡−2 + 𝛾11 𝐼𝑁𝐹𝐿𝑡−1 + 𝛾12 𝐼𝑁𝐹𝐿𝑡−2 +
𝜑11 𝑅𝑡−1 + 𝜑12 𝑅𝑡−2 + 𝑢1𝑡 (1)
𝐼𝑁𝐹𝐿𝑡 = 𝛽20 + 𝛽21 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽22 𝑈𝑁𝐸𝑀𝑡−2 + 𝛾21 𝐼𝑁𝐹𝐿𝑡−1 + 𝛾22 𝐼𝑁𝐹𝐿𝑡−2 +
𝜑21 𝑅𝑡−1 + 𝜑22 𝑅𝑡−2 + 𝑢2𝑡 (2)
𝑅𝑡 = 𝛽30 + 𝛽31 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽32 𝑈𝑁𝐸𝑀𝑡−2 + 𝛾31 𝐼𝑁𝐹𝐿𝑡−1 + 𝛾32 𝐼𝑁𝐹𝐿𝑡−2 +
𝜑31 𝑅𝑡−1 + 𝜑32 𝑅𝑡−2 + 𝑢3𝑡 (3)
• A recursive form VAR(2) model might include the following equations:

𝑈𝑁𝐸𝑀𝑡 = 𝛽10 + 𝛽11 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽12 𝑈𝑁𝐸𝑀𝑡−2 + 𝛾11 𝐼𝑁𝐹𝐿𝑡−1 +


𝛾12 𝐼𝑁𝐹𝐿𝑡−2 + 𝜑11 𝑅𝑡−1 + 𝜑12 𝑅𝑡−2 + 𝑢1𝑡 (1)
𝐼𝑁𝐹𝐿𝑡 = 𝛽20 + 𝛿21 𝑈𝑁𝐸𝑀𝑡 + 𝛽21 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽22 𝑈𝑁𝐸𝑀𝑡−2 + 𝛾21 𝐼𝑁𝐹𝐿𝑡−1 +
𝛾22 𝐼𝑁𝐹𝐿𝑡−2 + 𝜑21 𝑅𝑡−1 + 𝜑22 𝑅𝑡−2 + 𝑢2𝑡 (2)
𝑅𝑡 = 𝛽30 + 𝛿21 𝑈𝑁𝐸𝑀𝑡 + 𝛽31 𝑈𝑁𝐸𝑀𝑡−1 + 𝛽32 𝑈𝑁𝐸𝑀𝑡−2 + 𝛿31 𝐼𝑁𝐹𝐿𝑡 +
𝛾31 𝐼𝑁𝐹𝐿𝑡−1 + 𝛾32 𝐼𝑁𝐹𝐿𝑡−2 + 𝜑31 𝑅𝑡−1 + 𝜑32 𝑅𝑡−2 + 𝑢3𝑡 (3)
VAR models in matrix form
• Reduced-form VAR(2) with 3 variables.

𝛽11 𝛾11 𝜑11 𝛽12 𝛾12 𝜑12


𝑈𝑁𝐸𝑀𝑡 𝛽10 𝑈𝑁𝐸𝑀𝑡−1 𝑈𝑁𝐸𝑀𝑡−2 𝑢1𝑡
𝐼𝑁𝐹𝐿𝑡 = 𝛽20 + 𝛽21 𝛾21 𝜑21 𝐼𝑁𝐹𝐿𝑡−1 + 𝛽22 𝛾22 𝜑22 𝐼𝑁𝐹𝐿𝑡−2 + 𝑢2𝑡
𝑅𝑡 𝛽30 𝛽31 𝛾31 𝜑31 𝑅𝑡−1 𝛽32 𝛾32 𝜑32 𝑅𝑡−2 𝑢3𝑡

Or:

𝑦𝑡 = 𝐵1 𝑦𝑡−1 + 𝐵2 𝑦𝑡−2 + 𝑢𝑡 (2)


𝑢𝑡 ~𝑁(0, ∑𝑢 ) (3)
The stationary, k-dimensional, VAR(p) process can be written as:
𝑦𝑡 = 𝐵1 𝑦𝑡−1 +…+ 𝐵𝑝 𝑦𝑡−𝑝 + 𝐶𝑥𝑡 + 𝑢𝑡
where:
• 𝑦𝑡 is a k x 1 vector of endogenous variables,
• 𝑥𝑡 is a d x 1 vector of exogeneous variables,
• 𝐵1 ,…, 𝐵𝑝 are k x k matrices of lag coefficients to be estimated,
• C is a k x d matrix of exogeneous variable coefficients to be estimated,
• 𝑢𝑡 is a k x 1 white noise innovation process, with 𝑢𝑡 ~𝑁(0, ∑𝑢 ). So, the vector of
innovations are contemporaneously correlated. The correlation of innovations reflects
the contemporaneous relation between the variables.
• Reduced-form VARs do not tell us anything about the structure of the economy.
• We cannot interpret the reduced-form error terms (𝑢𝑡 ) as structural shocks.
• In order to perform policy analysis, we want to have:
▫ Orthogonal shocks…
▫ …with economic meaning.
• We need a structural representation.
• A VAR model that allows for contemporaneous relationships among its variable can
be written as:
𝐴𝑦𝑡 = 𝐵1 𝑦𝑡−1 + 𝐵2 𝑦𝑡−2 + 𝑒𝑡 (1)
𝑒𝑡 ~𝑁(0, 𝐼)
where 𝑒𝑡 are serially uncorrelated and independent of each other.
• The A matrix contains all contemporaneous relation among the endogenous
variables.
Specifying a VAR model
• A VAR model is made up of a system of equations that represents the relationships
between multiple variables. We need to know:
oHow many endogenous variables are included in the model?
oHow many autoregressive terms are included?
• For example, if we have 2 endogenous variables and 2 autoregressive terms, we say
the model is bivariate VAR(2) model. If we have 3 endogenous variables and 4
autoregressive terms, we say a trivariate VAR(4) model.
• In general, a VAR model is composed of k-equations (for k endogenous variables) and
p-lags of the variables.
Deciding what endogenous variables to include in VAR
• Additional variables:
▫ Increases the number of coefficients to be estimated for each equation and each
number of lags.
▫ Introduce additional estimation error.
• Deciding what variables to include in a VAR model should be founded in theory, as
much as possible. We can use Granger causality to test the forecasting relevance of
variables.
• Granger causality tests whether a variable is helpful for forecasting the behavior of
another variable. Note that Granger causality only allows us to make inferences about
forecasting capabilities, not about true causality.
Optimal lags selection
• Lag selection is one of the most important aspects of VAR model specification. In
practice, we generally choose a maximum number of lags, 𝑝𝑚𝑎𝑥 , and evaluate the
performance of the model including 𝑝 = 0,1, … , 𝑝𝑚𝑎𝑥 .
• The optimal model is then the model VAR(p) which minimizes some lag selection
criteria. The most commonly used criteria are AIC, BIC, Hannan-Quinn(HQ). There
should be no autocorrelation at the selected lag.
• Wooldridge: for annual data, the number of lags is typically small (1 or 2 lags). For
quarterly data, 1-8 lags. For monthly data, 6, 12 or 24 lags.
Estimating and inference in VAR models
• Despite their seeming complexities, VAR models are quite easy to estimate. The
equation can be estimated using OLS given a few assumptions:
▫ The error term has a conditional mean of 0.
▫ The variables in the model are stationary.
▫ Large outliers are unlikely.
▫ No perfect multicollinearity.
Test for stationarity
• In time series analysis, the words nonstationary, unit root or random walk model
are used synonymously. If a series is nonstationary, it exhibits a unit root and
exemplifies a random walk series. We use unit root test to check for stationarity.
• If the variable is stationary at level, the order of integration of the variable is zero,
I(0). If the series is stationary at level after performing a unit root test, then it is I(0).
Otherwise, it is I(d), where d represents the number of times the series is
differenced before it becomes stationary.
• We can use Augmented Dickey-Fuller test, Phillips-Perron (PP) test, KPSS test.
Forecasting
• One of the most important functions of VAR models is to generate forecasts.
• Forecasts are generated for VAR models using an iterative forecasting algorithm:
1. Estimate the VAR model using OLS for each equation.
2. Compute the one-period-ahead forecast for all variables.
3. Compute the two-period-ahead forecast, using the one-period-ahead forecast.
4. Iterate until the h-step ahead forecasts are computed.
Reporting and evaluating VAR models
• Often, we are more interested in the dynamics that are predicted by our VAR model
than the actual coefficients that are estimated. For this reason, it is most common
that VAR studies report:
▫ Granger-causality statistics
▫ Impulse response functions
▫ Forecast error decompositions
Granger-causality statistics
• Granger-causality tests whether (lagged values of) one variable is statistically
significant when predicting another variable.
• Granger-causality statistics are F statistics that test if the coefficients of all lags of a
variable are jointly zero in the equation for another variable. As the p-value of the F-
statistic decreases, it is evident that a variable is relevant for predicting another
variable increases.
• H0: X does not Granger cause Y.
• H1: X Granger causes Y.

If p.value is:
• <0.05: X Granger causes Y at the 5% significance level.
• >0.05: X does not Granger cause Y at the 5% significance level.
Impulse response function
What do you understand by impulse response function?
1. Explains the reaction of an endogenous variable to one of the innovations.
2. Describes the evolution of the variable of interest along a specified time horizon
after a shock in a given moment.
3. An essential tool in empirical causal analysis and policy effectiveness analysis.
4. Tracks the impact of a variable on other variables in the system.
5. Traces the effects on present and future values of the endogenous variable of one
standard deviation shock to one of the innovations.
Impulse response function
6. In signal processing, the impulse response of a dynamic system is its output when
presented with a brief input signal, called an impulse.
7. Used in explaining the concepts of “pass through”. The degree at which the changes
in a variable are passed to other variables at different stages either directly or
indirectly.
8. Used to further assess the tendency of significant Granger causality results.
• The IRF traces the dynamic path of variables in the
system to shocks to other variables in the system.
• This is done by:
▫ Estimating the VAR model.
▫ Implementing a one-unit increase in the error of
one of the variables in the model while holding
the other errors equal to 0.
▫ Predicting the impacts h-period ahead of the
error shock.
▫ Plotting the forecast impacts, along with the one-
standard-deviation confidence intervals.
• In order to identify the impulse responses, a restriction is applied in the main matrix
– “Cholesky decomposition”.
• The order of the variables play a key role as the restrictions on the matrix implies
some shocks have no contemporaneous effects on some of the variables in the
system.
• Economic theory and sensible assumptions are required to order the variables.
• For example: a VAR(1) model with unemployment rate and Fed rate.

𝑏11 0 𝑈𝑁𝐸𝑀𝑃𝑡
= 𝐵𝑍𝑡−1 + 𝑒𝑡
𝑏21 𝑏22 𝐹𝐸𝐷𝑡
Cholesky decomposition
• Fed rate shocks have no contemporaneous effect on unemployment.
Unemployment responds with lags to changes in Fed rate.
• Unemployment shocks have contemporaneous effects on the Fed rate.
Policymaker has current information on the economy to set the rate.
• Note: The most exogeneous variable in the model should go first, then
the 2nd most exogeneous variable and so on. The Granger causality test
can help to decide which variables are the most and least exogeneous.
The variables that are explained by others (according to Granger test) are
more endogenous than those that aren’t.
Forecast error decomposition
• Forecast error (variance) decomposition displays the percentage of the error made
forecasting a variable over time due to a specific shock.
• It helps to judge how much of an impact one variable has on another variable in the
VAR model and how intertwined our variables’ dynamics are.
• For example, if X is responsible for 85% of the forecast error variance of Y, it is
explaining a large amount of the forecast variation in X. However, if X is only
responsible for 20% of the forecast error variance of Y, much of the forecast error
variance of Y is left unexplained by X.
Step-by-step procedure in VAR modelling
1. Specify the model
2. Perform stationarity test.
3. Determine the optimal lag length (p) for the model
4. Estimate the basic VAR with (p) lags
5. Perform postestimation checks: normality test, autocorrelation, stability,…
6. Perform impulse responses
7. Interpret the results
VAR stability conditions
• Stability in VAR system implies stationarity, “stationarity conditions”.
oIf all inverse roots of the characteristics AR polynomial have modulus less than 1
and lie inside the unit circle, the estimated VAR is stable.
oIf the VAR is not stable, diverse tests conducted on our VAR model may be invalid.
Impulse response standard errors are not valid.
• It’s important to check for residuals diagnostics!
VAR modelling in STATA
1. Specify the model
2. Time set the data. Use: tsset
Perform stationarity test. Series must be I(1) and not I(2). Use: dfuller, pperron,…
3. Determine the optimal lag length (p) for the model. Use: varsoc
4. Estimate the VAR with (p) lags. Use: var
5. Perform postestimation checks: normality test, autocorrelation, stability. Use:
varlmar, varnorm, varstable
6. Perform impulse responses. Use: irf
A 3-variable VAR model
𝒍𝒏𝒑𝒅𝒊𝒕 =∝1 + ∑𝒌𝒊=𝟏 𝜷𝒊 𝒍𝒏𝒑𝒅𝒊𝒕−𝒊 + ∑𝑘𝑗=1 𝜙𝑗 𝑙𝑛𝑝𝑐𝑒𝑡−𝑗 + ∑𝑘𝑚=1 𝜑𝑚 𝑙𝑛𝑔𝑑𝑝𝑡−𝑚 + 𝑢1𝑡
𝒍𝒏𝒑𝒄𝒆𝒕 =∝1 + ∑𝑘𝑖=1 𝛽𝑖 𝑙𝑛𝑝𝑑𝑖𝑡−𝑖 + ∑𝑘𝑗=1 𝜙𝒋 𝒍𝒏𝒑𝒄𝒆𝒕−𝒋 + ∑𝑘𝑚=1 𝜑𝑚 𝑙𝑛𝑔𝑑𝑝𝑡−𝑚 + 𝑢1𝑡
𝒍𝒏𝒈𝒅𝒑𝒕 =∝1 + ∑𝑘𝑖=1 𝛽𝑖 𝑙𝑛𝑝𝑑𝑖𝑡−𝑖 + ∑𝑘𝑗=1 𝜙𝑗 𝑙𝑛𝑝𝑐𝑒𝑡−𝑗 + ∑𝑘𝑚=1 𝝋𝒎 𝒍𝒏𝒈𝒅𝒑𝒕−𝒎 + 𝑢1𝑡
Notes:
• u are the stochastic error terms, often called impulses/innovations/shocks.
• The dependent variable is a function of its lagged values and the lagged values of other
variables in the model.
• VAR must be specified in levels. VAR in differences would be mis-specified.
• Individual coefficients in the estimated VAR models are often difficult to interpret,
hence practitioners often estimate the impulse response function (IRF).
• The IRF traces out the response of the dependent variable in the VAR system to shocks
in the error terms, such as 𝑢1𝑡 , 𝑢2𝑡 and 𝑢3𝑡 .
• Suppose 𝑢1𝑡 in the lnpdi equation increases by a value of one standard deviation. Such
a shock or change will change lnpdi in the current as well as future periods. But since
lnpdi appears in the lnpce and lngdp regressions, the change in 𝑢1𝑡 will also have an
impact on lnpce and lngdp.
• Similarly, a change of one standard deviation in 𝑢2𝑡 of the lnpce equation will have
an impact on lnpdi and lngdp… and same for a change of one standard deviation in
𝑢3𝑡 of the lngdp equation.
• The IRF traces out the impact of such shocks for several periods in the future.
• Although the utility of IRF analysis has been questioned by researchers, it is the core
of VAR analysis.
Interpretation of IRF graph
Interpretation of a standard deviation shock to lnpdi:
1. Response on lnpce:
A one standard deviation shock (innovation) to personal disposable income temporarily
increases personal consumption expenditure. This positive response gradually declines
until the 3rd period when it hits its steady state value. Beyond period three, personal
consumption expenditure rises above its steady state value and remains in the positive
region.
-> A shock to lnpdi will have a positive impact on lnpce both in the short run and long
run.
2. Response on lngdp:
A one standard deviation shock (innovation) to personal disposable income initially
increases real gross domestic output. This positive response gradually declines until
the fourth period when it hits its steady state value. Beyond period six, real gross
domestic output rises above its steady state value and remains in the positive
region.
-> A shock to lnpdi will have a positive impact on lngdp both in the short run and
long run.
Note
• Innovations and responses must be consistent with intuition, economic theory or a
priori expectations.
• For example, our results are consistent because with more income, people tend to
spend more and this leads to more consumption, creating demand for production,
investment goes up leading to economic growth.
Estimation of SVAR

• Consider a SVAR(1) model with variables: GDP growth, inflation, interest rate:
𝐴𝑦𝑡 = 𝐵𝑦𝑡−1 + 𝑒𝑡 , 𝑒𝑡 ~𝑁 0. 𝐼 (1)
• We multiply both sides of equation (1) by 𝐴−1 :
𝐴−1 𝐴𝑦𝑡 = 𝐴−1 𝐵𝑦𝑡−1 + 𝐴−1 𝑒𝑡 , 𝑒𝑡 ~𝑁 0. 𝐼 (2)
𝑦𝑡 = 𝐹𝑦𝑡−1 + 𝑢𝑡 , 𝑢𝑡 ~𝑁(0, ∑𝑢 ) (3)
So:

𝐹= 𝐴−1 𝐵, 𝑢𝑡 = 𝐴−1 𝑒𝑡 , ∑𝑢 = −1
𝐴 𝐼𝐴−1 = 𝐴−1 𝐴−1′
The VAR in equation (3) is the usual one we use to estimate the reduced-form of VAR.
• If we know 𝐴−1 : 𝐵 = 𝐴𝐹
• If we know 𝐴−1 : 𝑒𝑡 = 𝐴𝑢𝑡
• Identification: how to identify 𝐴−1

• We have 9 unknowns (elements of A), but only 6 equations (because the variance-
covariance matrix is symmetric). The system is not identified!
Structural VAR models: Identification schemes

• Short-run restrictions (Cholesky) – Lower triangular matrix.


• Long-run restrictions (Blanchard and Quah, 1989), (Enders & Lee, 1997).
• Sign restrictions – Uhlig (2005)
Zero short-run restrictions (Choleski identification)
• Assume A or equivalently 𝐴−1 to be lower triangular:
• In our example: GDP growth (𝑦𝑡 ), inflation (𝜋𝑡 ), interest rate (𝑟𝑡 )

• Remember: identification problem, we have 6 equations and 9 unknowns.


• Now: we set three elements of A equal to 0. So, we have: 6 equations and 6
unknowns: identification!
Choleski identification: Interpretation

Let’s look at the shocks:


• 𝜀𝑦𝑡 affects contemporaneously all the variables.
• 𝜀𝜋𝑡 affects contemporaneously inflation (𝜋𝑡 ) and interest rate (𝑟𝑡 ), not GDP growth (𝑦𝑡 )
• 𝜀𝑟𝑡 affects contemporaneously only interest rate (𝑟𝑡 ), not GDP growth (𝑦𝑡 ) and inflation (𝜋𝑡 ) .
The order of the variables matters! Interest rate is the most exogenous, it is affected only by a
shock to itself.
SVAR in STATA
• Structural VAR model:
𝑛

𝐴𝑦𝑡 = 𝑐0 + ෍ 𝐴𝑖 𝑦𝑡−𝑖 + 𝐵𝜀𝑡


𝑖=1
• The short run restrictions are placed on A and B matrix, where A matrix is the one we focus.
B matrix places restrictions on the error structure. For 3-variable SVAR:

. 0 0
B= 0 . 0 . This ensures the covariance between variables are unrelated.
0 0 .
1 0 0
A= . 1 0 . The diagonal reflects that the own-effect has to be one.
. . 1

You might also like