Lecture Panel Var
Lecture Panel Var
Series
Firmin Doko
Tchatoka
Introduction
Panel VAR
Panel VAR Models
Specification
Estimation
Firmin Doko
Tchatoka
1 Introduction
Introduction
2 Panel VAR Specification
Panel VAR
Specification
Estimation 3 Estimation
Model selection
END
6 Stata Panel VAR Estimation Commands
7 END
Multivariate Time
Series
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response
Introduction
Functions
END
Motivation
Multivariate Time
Series
Firmin Doko ◦ Panel vector autoregression (VAR) models have been increasingly used in
Tchatoka
applied research
Introduction
Panel VAR
◦ Chapter will briefly discuss model selection, estimation, and inference of
Specification homogeneous panel VAR models in a generalized method of moments
Estimation (GMM) framework
Model selection
END ◦ Stata’s built-in gmm command allows for use of all available gmm
options, addition of exogenous covariates to the VAR system, subroutines
to implement Granger (1969) causality tests, and optimal moment and
model selection criteria (MMSC)– Andrews and Lu (2001, Econometrica)
Multivariate Time
Series
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Panel VAR Specification
Impulse-Response
Functions
END
Model specification
Multivariate Time
Series
◦ A n-variate homogeneous panel VAR of order p with panel-specific fixed
Firmin Doko effects is represented by the following system of linear equations:
Tchatoka
Yit = A1 Yi,t−1 + . . . + Ap Yi,t−p + Xit B + αi + εit ,
Introduction
Panel VAR
i ∈ {1, 2, . . . , N}, t ∈ {1, . . . .T }, (1)
Specification
Estimation
Model selection
− Yit : n × 1 vector of dependent, Xit : k × 1 vector of exogenous covariates
Impulse-Response
Functions
− The n × n matrices A1 , . . . , Ap and the n × k matrix B contain unknown
parameters to be estimated
Stata Panel VAR
Estimation
Commands
− αi and εit are n × 1 vectors of dependent variable-specific panel fixed effects
END
and idiosyncratic errors, respectively
− Assumption. E(εit ) = 0, E(εit ε′it ) = Σ > 0, and E(εit ε′is ) = 0 for all t > s.
◦ Model (1) assumes that the cross-sectional units share the same
underlying data generating process, with common reduced-form
parameters A1 , . . . , Ap and B
Multivariate Time
Series
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response
Estimation
Functions
END
GMM estimation
Multivariate Time
Series
◦ Various GMM estimators have been proposed to consistently estimate
Firmin Doko
Tchatoka the above system, especially in fixed T and large N settings.
Introduction ◦ Under the assumption that errors are serially uncorrelated, the model in
Panel VAR
Specification
first difference (FD) may be consistently estimated equation by equation
Estimation
by instrumenting lagged differences with differences and levels of Yit from
Model selection
earlier periods (Anderson-Hsiao, 1982)
Impulse-Response
Functions − This estimator, however, has some problems:
Stata Panel VAR ⋆ The FD transformation magnifies the gap in unbalanced panels
Estimation
Commands ⋆ For instance, if some Yi,t−1 are not available, then the FDs at time t and
END t − 1 are likewise missing
⋆ Also, the necessary time periods each panel is observed gets larger with the
lag order of the panel VAR. As an example, for a second-order panel
VAR, instruments in levels require that Ti ≥ 5 realizations be observed
for each subject
GMM estimation (cont’d)
Multivariate Time
Series ◦ Arellano-Bover (1995): Forward orthogonal deviation (FOD) as an
Firmin Doko alternative transformation, which does not share the weaknesses of the
Tchatoka
FD transformation
Introduction
Panel VAR
− Instead of using deviations from past realizations, it subtracts the average
Specification of all available future observations, thereby minimizing data loss:
Estimation ⋆ Because past realizations are not included in this transformation, they
Model selection remain valid instruments
Impulse-Response
Functions
⋆ Potentially, only the most recent observation is not used in estimation. In a
second-order panel VAR, for instance, only Ti ≥ 4 realizations are necessary
Stata Panel VAR
Estimation to have instruments in levels
Commands
Impulse-Response
Yit∗ ∗
= AỸi,t + ε∗it , (2)
Functions ∗ ∗ ∗
∗′ ∗′ ∗′ ′
Yit∗ = [yit1 , yit2 , . . . , yitn ]′ , ∗
Ỹi,t = [Yi,t−1 , Yi,t−2 , . . . , Yi,t−p , Xit∗ ]′
Stata Panel VAR
∗ ∗ ∗
Estimation
Commands ε∗it = [ε1it , ε2it , . . . , εnit ], A = [A′1 , A2 , . . . , A′p , B ′ ]′
END
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response
Model selection
Functions
END
Model selection
Multivariate Time
Series
◦ Panel VAR analysis is predicated upon choosing the optimal lag order in
Firmin Doko both panel VAR specification and moment condition:
Tchatoka
− Can be done with Andrews-Lu’s (2001) MMSC for GMM models based on
Introduction
Hansen’s (1982) J-statistic of overidentifying restrictions
Panel VAR
Specification
− MMSC is analogous to various commonly used maximum likelihood-based
Estimation
model-selection criteria: the Akaike information criteria (AIC) (Akaike
Model selection 1969), the Bayesian information criteria (BIC) (Schwarz 1978; Rissanen
Impulse-Response 1978; Akaike 1977), and the Hannan–Quinn information criteria (HQIC)
Functions
(Hannan and Quinn 1979)
Stata Panel VAR
Estimation
Commands − If we apply Andrews-Lu’s (2001) MMSC to the GMM estimator in (3), their
END proposed criteria select the pair of vectors (p, q) that minimizes
MMSCBIC ,N (n, p, q) = JBIC ,N (n2 p, n2 q) − n2 (|q| − |p|)ln(N) (4)
2 2 2
MMSCAIC ,N (n, p, q) = JAIC ,N (n p, n q) − 2n (|q| − |p|) (5)
2 2 2
MMSCHQIC ,N (n, p, q) = JHQIC ,N (n p, n q) − Rn (|q| − |p|)lnln(N) (6)
R>2
Model selection– Comments
Multivariate Time
Series
Impulse-Response
− As an alternative criterion, the overall coefficient of determination (CD)
Functions may be calculated even with just-identified GMM models:
Stata Panel VAR
Estimation
det(Σ̂)
Commands
CD = 1− , (7)
END det(Ψ̂)
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response Functions
Impulse-Response
Functions
END
IRFs
Multivariate Time
Series
◦ Without loss of generality, we drop the exogenous variables in our
Firmin Doko notation and focus on the autoregressive structure of the panel VAR in (1)
Tchatoka
◦ Lütkepohl (2005) and Hamilton (1994) both show that a VAR model is
Introduction
Panel VAR
stable if all moduli of the companion matrix A are strictly less than one,
Specification where the companion matrix is formed by
Estimation
Model selection
A1 A2 . . . Ap−1 Ap
Impulse-Response
Functions
In 0n ... 0n 0n
Stata Panel VAR Ā =
0n In ... 0n 0n (8)
Estimation
Commands
.. .. .. .. ..
. . . . .
END
0n 0n ... In 0n
− Stability implies that the panel VAR is invertible and has an infinite-order
vector moving average (VMA) representation
− This provides known interpretation to estimated IRFs and FEVDs
IRFs (cont’d)
Multivariate Time
Series
Firmin Doko ◦ The simple IRF Φj may be computed by rewriting the model as an infinite
Tchatoka
VMA, where Φj are the VMA parameters:
Introduction
Panel VAR
Specification In
if j = 0
Estimation Φj = (9)
Model selection Pj
h=1 Ah Φt−h if j = 1, 2, . . .
Impulse-Response
Functions
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response
Stata Panel VAR Estimation Commands
Functions
END
STATA syntax
Multivariate Time
Series ◦ Syntax: xtset your data to declare them time series
Firmin Doko
Tchatoka
− Model selection, estimation, and inference about the homogeneous panel
Introduction VAR model are implemented with the new commands: pvar, pvarsoc,
Panel VAR
pvargranger, pvarstable, pvarirf, pvarfevd
Specification
Estimation
− Syntax and outputs are closely patterned after Stata’s built-in var
Model selection
commands to easily switch between panel and time-series VAR
Impulse-Response
Functions
− pvarsoc depvarlist [if] [in][, options]
Stata Panel VAR − pvar depvarlist [if] [in][, options]
Estimation
Commands
END
◦ Options. lags(#): maximum lag order # ; exog(varlist): exogenous
covariates; fod/fd: specify how the panel-specific fixed effects will be
removed. fod (default): → panel-specific fixed effects is removed using
forward orthogonal deviation or Helmert transformation; fod:
panel-specific fixed effects is removed using first difference; and so on.
STATA syntax (cont’d)
Multivariate Time
Series
◦ Syntax
Firmin Doko
Tchatoka − pvargranger [, estimates(estname)]
Introduction − pvarstable [, estimates(estname)]
Panel VAR
Specification − pvarirf [, options]
Estimation
Stata Panel VAR ◦ options for pvarirf. estep(#): specifies the step (forecast) horizon–
Estimation
Commands default is 10 periods; impulse(impulsevars) and
END response(responsevars): specify the impulse and response variables;
oirf: orthogonalized IRFs; dm: dynamic multipliers for exogenous
variables instead of IRFs; cumulative: cumulative IRFs– option may be
combined with oirf ; and so on.
Example 1: Panel study of income dynamics
Multivariate Time
Series
◦ Use psidextract data accessible from Stata. Replicate the reduced-form
Firmin Doko panel VAR in Holtz-Eakin, Newey, and Rosen (1988) using observations
Tchatoka
from 528 males over 1976-1982 from the Panel Study of Income and
Introduction Dynamics (PSID)
Panel VAR
Specification ◦ command/options
Estimation − webuse psidextract
Model selection
− generate lwks = ln(wks)
Impulse-Response
Functions
− pvar lwks lwage if fem == 0, lags(3)
Stata Panel VAR
Estimation
Commands ◦ Standard output table
END
− A header containing summary of GMM criterion and pvar data
− A table showing the standard Stata outputs (coefficients, standard
errors, and confidence intervals)
Multivariate Time
Series
◦ command
Firmin Doko
Tchatoka − pvarsoc lwks lwage if fem == 0, pvaropts(instlags(1/4))
Introduction − pvar lwks lwage if fem == 0, lags(1)
Panel VAR
Specification ◦ Can do: pvargranger , pvarstable, pvarirf , pvarfevd, pvarsoc
Estimation
Model selection
◦ Above specifications assume that all the endogenous variables are
Impulse-Response stationary– GMM estimator used in pvar suffers from weak instrument
Functions
problems when the variable being modeled is near unit root
Stata Panel VAR
Estimation
Commands − command for panel unit-root tes: xtunitroot ht lwks if fem == 0 and
END xtunitroot ht lwage if fem == 0. We that only lwage has unit root
− We mitigate this issue by using the growth rates of weeks worked, gwks,
and of wage rate, gwage, in the panel VAR
− pvar gwks gwage if fem == 0, lags(1)
Example 2: National Longitudinal Survey
Multivariate Time
Series ◦ Panel VAR models in the previous example are fit using FODs to remove
Firmin Doko the individual fixed effects. Another way to remove the FEs is to use FDs
Tchatoka
◦ Use the subsample of women aged 14–26 years in 1968 from the
Introduction
1968–1975 NLS of Youth available from Stata– Holtz-Eakin, Newey, and
Panel VAR
Specification Rosen (1988) analyzed the 1966–1975 NLS of Men
Estimation ◦ Assuming stationarity, we run first-order panel VAR models using either
Model selection the fd or the fod option and using different numbers of lags as
Impulse-Response instruments
Functions
− Present results with two lag options for each model– using one lag (that is,
Stata Panel VAR
Estimation the second in FD and the first in FOD) and using two lags (that is, lags two
Commands
and three in FD and lags one and two in FOD).
END
− Note that by construction, first differencing introduces serial correlation in
the model; thus only further lags are valid instruments
− Problem of missing observations when using longer lags as instruments may
be circumvented by using GMM-style instruments, where missing
observations are substituted with zero: Holtz-Eakin, Newey, & Rosen (1988)
Example 2 (cont’d)
Multivariate Time
Series
◦ Stata code
Firmin Doko
Tchatoka webuse nlswork2, clear
Introduction
ln−wks = ln(wks−wks )
Panel VAR
pvar ln−wks ln−wage , fd
Specification
estimates store fd2
Estimation
pvar ln−wks ln−wage , fd instlags(2/3)
Model selection
estimates store fd2t3
Impulse-Response
Functions pvar ln−wks ln−wage , fod
Stata Panel VAR estimates store fod1
Estimation
Commands pvar ln−wks ln−wage , fod instlags(1/2)
END estimates store fod1t2
estimates table fd2 fd2t3 fod1 fod1t2 , b(%3.2f) se(%3.2f) stats(N J
J−pval ) modelwidth(8)
◦ Can do: pvargranger , pvarstable, pvarirf , pvarfevd, pvarsoc
Multivariate Time
Series
Firmin Doko
Tchatoka
Introduction
Panel VAR
Specification
Estimation
Model selection
Impulse-Response
END
Functions
END