introduction to vars and structural vars -...
TRANSCRIPT
![Page 1: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/1.jpg)
Introduction to VARs
and Structural VARs:
Estimation & Tests Using Stata
Bar-Ilan University 26/5/2009
Avichai Snir
![Page 2: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/2.jpg)
Background: VAR
• Background:
• Structural simultaneous equations
– Lack of Fit with the data
– Lucas Critique (1976)
• VAR: Vector Auto Regressions
– Simple
– Non Structural
– All Variables are treated identically
– Better Fit with the Data
![Page 3: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/3.jpg)
Simple VAR: Sims (1980)
• Symmetric
– Lags of the dependent variables
– Same Number of Lags
tttttttt
tttttttt
tttttttt
yyyyyyy
yyyyyyy
yyyyyyy
,32,332,222,141,331,221,110,31
,22,332,222,141,331,221,110,2
,12,332,222,141,331,221,110,1
...
...
...
εγγγγγγγεβββββββεααααααα
++++++++=
++++++++=
++++++++=
−−−−−−
−−−−−−
−−−−−−
( )3,2,1,
0),(
,,,
∈
≠
==
ji
tif
tifE
jijti
τ
τσεε τ
![Page 4: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/4.jpg)
Simple VAR: Matrix Form• In Matrix Form:
• is a vector of the Dependent Variables
• is a Matrix of Coefficients
• is a Matrix in Lagged Variables
• is a Vector of White Noise Errors
• is a Matrix of exogenous variables (constant,…)
( )[ ] tt
tttt
yI
yyy
ε
εα
+Α=Γ−
++Γ+Γ+= −−−−
L
Simplyor
tt
:
...2211
ty
i−Γt( )LΓ
tε
Α
![Page 5: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/5.jpg)
( )
=×
=×
:
00...0...00
...0...0...00
::::
00...00...0
...0......00
...00
::::
...00...00...00
...0...0...00
...0...0...00
.........
:
:
:
3,32,31,3
3,32,31,3
3,21,2
3,22,21,2
2,21,2
1,1
3,12,11,1
3,12,11,1
3,32,31,33,22,21,23,12,11,1
1,1
2,3
1,3
1,2
2,2
1,2
3,1
2,1
1,1
σσσσσσ
σσσσσ
σσ
σσσσ
σσσ
εεεεεεεεε
ε
εε
εεε
εεε
'εε tt
Covariance Matrix
![Page 6: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/6.jpg)
Contemporary Variance Matrix
=Ω
3,32,31,3
3,22,21,2
3,12,11,1
σσσσσσσσσ
![Page 7: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/7.jpg)
Issues Before Estimation
• Stationarity:
–Constant expected value
–Constant Variance
–Constant Covariances
• Granger Exogeneity:
–Order of variables
• Lag Length
–Optimal lag length
![Page 8: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/8.jpg)
Testing Stationarity
• We have data on Canada 1966Q1-2002Q1
– GDP
– Consumer Price Index (CPI)
– Household Consumption (consumption)
1966Q365.4718.4138.46
1966Q264.5818.2437.47
1966Q162.5318.0436.91
DescriptorGDPCPIConsumption
![Page 9: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/9.jpg)
Declare: Time Series• Define and format: time variable
– date(var_name,”dmy”) or
– Quarterly(var_name, “yq”)
– format: format var_name %d
• Declare database as time series
– Menu: statistics time series setup & utilities
declare dataset to be time series data
![Page 10: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/10.jpg)
Declaring Time series
![Page 11: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/11.jpg)
Declare Time Series
![Page 12: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/12.jpg)
Transformations
• Convenience
– taking logs: gen var_name=log(var_name)
• Differences are in percentage
![Page 13: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/13.jpg)
Plots• Menu: Graphics easy graphs line graph
• Follow the wizard…
![Page 14: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/14.jpg)
GDP4
56
7log of gdp
01jan1960 09sep1973 19may1987 25jan2001date
log of gdp
![Page 15: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/15.jpg)
34
56
7log of household consumption
01jan1960 09sep1973 19may1987 25jan2001date
Log of household consumption
![Page 16: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/16.jpg)
33.5
44.5
5log of cpi
01jan1960 09sep1973 19may1987 25jan2001date
log of CPI
![Page 17: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/17.jpg)
Stationarity• Data don’t look stationary
• Formal test required
• Common tests (Greene, 636-646):
– Dickey Fuller:
• H0: Variable has a unit root
– Philips Peron
• H0: Variable has a unit root
– Dickey Fuller – GLS
• H0: Variable has a unit root
![Page 18: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/18.jpg)
Testing:
• Menu: StatisticsTime SeriesTests
• Choose a test and follow the menu
– Augmented Dickey Fuller
– DF-GLS for a Unit root
– Phillips-Peron unit root
![Page 19: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/19.jpg)
Choosing a test
![Page 20: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/20.jpg)
Running a Test• Augmented Dickey-Fuller Test
– 6 lags
– Including Trend
![Page 21: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/21.jpg)
Result
• Cannot reject the null at 5%
Result Critical Values
![Page 22: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/22.jpg)
Create First Differences
• Cannot Reject Unit root: Data is I(1)
• Create First Differences of the data:
![Page 23: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/23.jpg)
Check the new graphs-.02
0.02
.04
.06
log of differenced GDP
01jan196 0 09sep1973 19may1987 25jan2001date
Log o f d if fe renced GDP
![Page 24: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/24.jpg)
-.01
0.01
.02
.03
inflation
01jan1960 09sep1973 19may1987 25jan2001date
Inflation
![Page 25: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/25.jpg)
0.01
.02
.03
.04
.05
difference household consumption
01jan1960 09sep1973 19may1987 25jan2001date
differenced household consumptionLog
![Page 26: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/26.jpg)
Is it stationary now? (PP test)
The differenced data seems to be stationary
![Page 27: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/27.jpg)
Granger Causality
• X Does not Granger Cause Y if:
• Test (Greene, p.592):
– Regress Y on lags of X and Y
– Regress Y on lags of Y
– Test if the restricted model is significantly outperformed by the non restricted model
– Either χ2 or F test
...),|(...),,...,,|( 212121 −−−−−− = tttttttt yyyExxyyyE
![Page 28: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/28.jpg)
Granger Test• Run simple VAR between the variables of
interest
• Menu: Statisticsmultivariate time
seriesBasic Vector Autoregression Model
• Choose
– Variables
– Lag Length
![Page 29: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/29.jpg)
Granger Test: Running VAR
![Page 30: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/30.jpg)
Testing in Stata
• Statisticsmultivariate time series
var diagnostics and tests
Granger causality test
![Page 31: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/31.jpg)
Granger Test
• Choose variables
![Page 32: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/32.jpg)
Granger Test: Results
• We can reject that Inflation Granger Cause
Household Consumption
• We cannot reject that Household Consumption
Granger Cause Inflation
![Page 33: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/33.jpg)
Optimal Lag Length• Sometimes, we have theory to guide us
• Often, we do not
• Three common tests (Greene, 589):
– Likelihood Ratio Test (LR)
– Akaike Information Criterion
– Bayesian (Schwartz) Information Criterion
•
![Page 34: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/34.jpg)
Likelihood Ratio (LR) test
General to simple approach: Run VAR
with p lags. Use the LR test. If the test
rejects the null, then stop. Otherwise
run p-1 lags and compare with p-2…
( )
equationsofNumberM
matrixarianceedunrestrictW
matrixariancerestrictedW
MWWT
unres
res
unresres
−
−
−
→−=
cov
cov
lnln22
χλ
![Page 35: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/35.jpg)
Information Criteria
• Two information Criteria: Akaike (AIC) and
Bayesian (BIC). Find the information criteria
for lag length 1 to p. Choose the lag length
that minimizes the information criteria that
you chose.
,,2)(
,
,,cov
)()(|)ln(|
2
BICforTAICforTIC
equationsofnumberMnsobservatioofnumberT
lagsofnumberpMatrixarianceTheW
T
TICMpMW
−
−−
−−
++=λ
![Page 36: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/36.jpg)
Tests in Stata• Menu: Statisticsmultivariate time series
var diagnostics and tests
Lag-Order Selection statistics
![Page 37: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/37.jpg)
Running test
• Choose Variables
• Choose maximum lags
![Page 38: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/38.jpg)
Lag Length: Results
LR AIC BIC
We go with the LR and AIC and say 6
(why not?)
![Page 39: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/39.jpg)
Run Simple VAR
• We run a simple VAR (not structural, no
assumptions on order of variables)
between Household Consumption,
Inflation and GDP
• To do so:
• Menu: Statisticsmultivariate time
seriesBasic Vector
Autoregression Model
![Page 40: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/40.jpg)
Simple VAR• Choose
–Variables
–Lag Length
• Choose how to plot the response functions:
– Irf (simply uses the covariance matrix, minimum
order)
– Orf (orthogonalized the Covariance matrix to set
order)
– FEVD: Variance Decomposition Tables (In a
graph form)
![Page 41: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/41.jpg)
Simple VAR
![Page 42: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/42.jpg)
Results: Table of Coefficients
![Page 43: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/43.jpg)
Impulse Response Function
- .005
0
.005
.01
-.005
0
.005
.01
-.005
0
.005
.01
0 5 10 15 0 5 10 15 0 5 10 15
v arbas ic , dcons , dcons v arbas ic , dcons , inf lat ion v arbas ic , dcons , y
v arbas ic , inf lat ion, dcons v arbas ic , inf lat ion, inf lat ion v arbas ic , inf lat ion, y
v arbas ic , y , dcons v arbas ic , y , inf lat ion v arbas ic , y , y
95% CI orthogonali zed irf
s tep
Graphs by irf name, impulse variable, and response variable
![Page 44: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/44.jpg)
Simple VAR: Variance
Decomposition Table
![Page 45: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/45.jpg)
Generating After Estimation
• generate after estimation:
– Choose:
• Menu: StatisticsMultivariate time series IRF &
Variance Decomposition Analysis
• Choose the table or impulse response function that
you need
![Page 46: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/46.jpg)
To get the results
• If you want to use some of the results:• Coefficients
• Number of observations
• Etc…
– Stata keeps them under the ereturn command
– To get them type e(variable_name)
– To see all the variables that you can choose
from:
• ereturn list
![Page 47: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/47.jpg)
Examples
![Page 48: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/48.jpg)
More than simple VAR• More than a simple VAR:
– Adding Exogenous Variables
– Constraining blocks of variables to equal zero
• Use Menu: Statisticsmultivariate
time series Vector Autoregression
Model
• Generating Impulse Responses:
• Menu: StatisticsMultivariate time series
IRF & Variance Decomposition Analysis
![Page 49: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/49.jpg)
More than simple VAR• Adding constraints on the A or B matrix
– A: y Matrix, B: errors matrix
– Short and long run constraints
• skip lags
• Menu: Statisticsmultivariate time seriesStructural Autoregression Model
• Stata runs the VAR with the restrictions
• Caveat 1: Too many constraints can lead to failures in the convergence process
• Caveat 2: You need enough constraints to allow identification.
![Page 50: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/50.jpg)
Structural VAR
Defining a matrix
of constraints:
the ‘.’ imply a free
parameter
Using the
constraints:
Forcing the
values in the
constrained
matrix
![Page 51: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/51.jpg)
Structural VAR: Results
![Page 52: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/52.jpg)
Structural VAR: Results
- .005
0
.005
.01
-.005
0
.005
.01
-.005
0
.005
.01
0 5 10 15 0 5 10 15 0 5 10 15
v arbas ic , dcons , dcons v arbas ic , dcons , inf lat ion v arbas ic , dcons , y
v arbas ic , inf lat ion, dcons v arbas ic , inf lat ion, inf lat ion v arbas ic , inf lat ion, y
v arbas ic , y , dcons v arbas ic , y , inf lat ion v arbas ic , y , y
95% CI orthogonali zed irf
s tep
Graphs by irf name, impulse variable, and response variable
![Page 53: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/53.jpg)
Structural VARs
• Structural VAR: VAR that is the result
of a structural model
• Goal: Obtaining the Structural
parameters out of the Estimated
Reduced Form
• Required: Number of Constraints
![Page 54: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/54.jpg)
Model: Inflation and GDP
• Assume we have a simple model of the
form:
iablesrandomtindependennoiseWhite
lation
GDPy
yy
yy
tt
t
t
ttttt
tttt
var,,
inf
13210
12110
−
−
−
++++=
+++=
−
−−
ευπ
υπββββπεπααα
![Page 55: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/55.jpg)
We can write it:
ttttt
tttt
yy
yy
υπββββπεπααα+++=−
+++=
−
−−
13201
12110
![Page 56: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/56.jpg)
In Matrix Form:
+
+
=
− −
−
t
t
t
tt
t
t yy
υ
ε
πβ
α
πβ 1
1
0
0
1 1
01
OR:
−+
−+
−=
−
−
−−−
t
t
t
tt
t
t yy
υ
ε
βπββ
α
βπ
1
11
11
10
01
1 1
01
1
01
1
01
![Page 57: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/57.jpg)
Inverting the Matrix gives
=
−
−
1
01
1
01
1
1
1 ββ
So we can substitute this in the equations:
![Page 58: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/58.jpg)
We find:
( ) ( ) ( ) ( )ttttt
tttt
y
yy
υεβπβαββαββαβπεπααα
+++++++=
+++=
−−
−−
113211211001
12110
So we can write in VAR form:
tttt
tttt
y
yy
ηπθθθπεπααα
+++=
+++=
−−
−−
12110
12110
![Page 59: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/59.jpg)
Almost there
• After estimating the VAR we can find:
( )( )( ) 2321
1211
0001
θβαβ
θβαβ
θβαβ
=+
=+
=+
So we have three equations and four
unknowns…
![Page 60: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/60.jpg)
Hakuna Matata
• We also have the covariance matrix:
• So we have a fourth equation:
( )
+=
2
,1,1
,1,
,,
,,
tυσβσβ
σβσ
σσσσ
εεεε
εεεε
ηηηε
ηεεε
ηεεε σσβ ,,1 =
![Page 61: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/61.jpg)
Run the VAR• Note that because we assume that the “real”
covariance matrix has the triangular form:
• We can use the OIRF that Stata gives us (Cholesky
factorization) to watch the Structural impulse
functions.
εεεε
εεσσβ
σ
,,1
, 0
![Page 62: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/62.jpg)
Run the VAR (1 lag)
![Page 63: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/63.jpg)
Study the Impulse Responses
0
.00 5
.01
0
.00 5
.01
0 2 4 6 8 0 2 4 6 8
v arbas ic , inf lat ion, inf lat ion v arbas ic , inf lat ion, y
v arbas ic , y , inf lat ion v arbas ic , y , y
95% CI orthogonali zed irf
s tep
Graphs by ir f name, impulse var iable, and response variable
![Page 64: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/64.jpg)
Get the coefficients
1α
2θ1θ
0α2α
0θ
![Page 65: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/65.jpg)
Get the Errors matrix
εεσ ,
εεσβ ,1
![Page 66: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/66.jpg)
We find:
614.0142.0086.0625.0
142.0622.0086.0195.0
0043.00574.0086.00005972.0
086.000008145.0
000007018.0),cov(
2123
1112
0100
,1
=×−=−=
=×−=−=
−=×−=−=
===
αβθβ
αβθβ
αβθβ
σηε
βεε
![Page 67: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/67.jpg)
Conclusion
• Enough restrictions
• Exact Identification
• Possible to deduce the Structural
Parameters
![Page 68: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/68.jpg)
To test a restricted Model
• Run a non restricted model
• Test the null by using the LR test on the
difference between the restricted and
unrestricted model
( ) ( )
nsrestrictioofNumberM
matrixarianceedunrestrictW
matrixariancerestrictedW
MWWT
unres
res
unresres
−
−
−
→−=
cov
cov
lnln2
χλ
![Page 69: Introduction to VARs and Structural VARs - BIUecon.biu.ac.il/files/economics/seminars/presentation_var_23_5_09.pdf · Introduction to VARs and Structural VARs: ... Simple VAR: Matrix](https://reader031.vdocuments.mx/reader031/viewer/2022020204/5aecdfd37f8b9ad73f904643/html5/thumbnails/69.jpg)
Caveat
• With the data we used, it is likely that
the variables are cointegrated
(consumption and GDP)
• One should (theoretically) check for
that option