Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Panel VAR Model

Vector autoregression estimated across a panel of countries or regions to study common dynamics and shock propagation.

OverviewGraphMathReferences

Understand the mathematics

Follow the same equations and assumptions one section at a time or in a continuous reading.

Hover or focus a symbol defined in this model to find its exact matches. Select it to keep the highlight; Escape clears the selection.

Model Specification and Fixed-Effects Removal

The panel VAR stacks NNN unit-specific VARs that share a common lag structure but allow unit-specific intercepts.

Removing fixed effects in the presence of lagged dependent variables requires the Helmert (forward orthogonal deviation) transformation rather than standard within-group demeaning, which induces Nickell bias of order O(T−1)O(T^{-1})O(T−1).

After transformation, the system is ready for pooled estimation by OLS, system GMM, or Bayesian methods.

yit=μi+A1yi,t−1+⋯+Apyi,t−p+eit,i=1,…,N,t=1,…,Ty_{it} = \mu_i + A_1 y_{i,t-1} + \cdots + A_p y_{i,t-p} + e_{it}, \quad i=1,\ldots,N, \quad t=1,\ldots,Tyit​=μi​+A1​yi,t−1​+⋯+Ap​yi,t−p​+eit​,i=1,…,N,t=1,…,T
yity_{it}yit​μi\mu_iμi​eite_{it}eit​NNN

Reduced-form panel VAR for unit iii. Each unit shares the K×KK \times KK×K coefficient matrices A1,…,ApA_1, \ldots, A_pA1​,…,Ap​ but has its own intercept μi\mu_iμi​.

y~it=T−tT−t+1(yit−1T−t∑s=t+1Tyis)\tilde{y}_{it} = \sqrt{\frac{T-t}{T-t+1}} \left( y_{it} - \frac{1}{T-t} \sum_{s=t+1}^{T} y_{is} \right)y~​it​=T−t+1T−t​​(yit​−T−t1​s=t+1∑T​yis​)
y~it\tilde{y}_{it}y~​it​yity_{it}yit​

Helmert (forward orthogonal deviation) transformation. Subtracts the mean of all future observations for unit iii from the current observation, scaled to preserve homoskedasticity. This removes μi\mu_iμi​ because it cancels in the forward difference.

y~it=A1y~i,t−1+⋯+Apy~i,t−p+e~it\tilde{y}_{it} = A_1 \tilde{y}_{i,t-1} + \cdots + A_p \tilde{y}_{i,t-p} + \tilde{e}_{it}y~​it​=A1​y~​i,t−1​+⋯+Ap​y~​i,t−p​+e~it​
y~it\tilde{y}_{it}y~​it​

Transformed system. The fixed effect has been purged. The transformed error e~it\tilde{e}_{it}e~it​ remains orthogonal to lagged levels of yity_{it}yit​ under correct specification, which provides valid instruments for GMM.

1

YiY_iYi​ is the T×KT \times KT×K matrix of observations for unit iii, XiX_iXi​ collects the ppp lags, ιT\iota_TιT​ is a TTT-vector of ones.
Write the model in stacked form: Yi=μiιT′+XiA′+Ei\text{Write the model in stacked form: } Y_i = \mu_i \iota_T' + X_i A' + E_iWrite the model in stacked form: Yi​=μi​ιT′​+Xi​A′+Ei​
μi\mu_iμi​

2

The Nickell (1981) bias. Demeaning introduces correlation between the transformed lagged dependent variable and the transformed error. The bias is O(T−1)O(T^{-1})O(T−1) and does not vanish as N→∞N \to \inftyN→∞ for fixed TTT.
Standard within-group: Y¨i=Yi−Yˉi,but Cov(y¨i,t−1,e¨it)≠0 when T is finite\text{Standard within-group: } \ddot{Y}_i = Y_i - \bar{Y}_i, \quad \text{but } \text{Cov}(\ddot{y}_{i,t-1}, \ddot{e}_{it}) \neq 0 \text{ when } T \text{ is finite}Standard within-group: Y¨i​=Yi​−Yˉi​,but Cov(y¨​i,t−1​,e¨it​)=0 when T is finite

3

Forward orthogonal deviations. Each observation is differenced against the average of its own future, not its full-sample mean. This preserves orthogonality between e~it\tilde{e}_{it}e~it​ and lagged levels yi,t−1y_{i,t-1}yi,t−1​.
Helmert: y~it=ct(yit−yˉi,t+),ct=T−tT−t+1,yˉi,t+=1T−t∑s=t+1Tyis\text{Helmert: } \tilde{y}_{it} = c_t \left( y_{it} - \bar{y}_{i,t}^{+} \right), \quad c_t = \sqrt{\frac{T-t}{T-t+1}}, \quad \bar{y}_{i,t}^{+} = \frac{1}{T-t}\sum_{s=t+1}^T y_{is}Helmert: y~​it​=ct​(yit​−yˉ​i,t+​),ct​=T−t+1T−t​​,yˉ​i,t+​=T−t1​s=t+1∑T​yis​
y~it\tilde{y}_{it}y~​it​ctc_tct​yity_{it}yit​yˉi,t+\bar{y}_{i,t}^{+}yˉ​i,t+​

4

Under the assumption that eite_{it}eit​ is serially uncorrelated and yi,t−1y_{i,t-1}yi,t−1​ is predetermined, the forward-looking average introduces no spurious correlation. This is why lagged levels are valid instruments after Helmert transformation.
Cov(e~it,yi,t−1)=ct[Cov(eit,yi,t−1)−1T−t∑s=t+1TCov(eis,yi,t−1)]=0\text{Cov}(\tilde{e}_{it}, y_{i,t-1}) = c_t \left[ \text{Cov}(e_{it}, y_{i,t-1}) - \frac{1}{T-t} \sum_{s=t+1}^T \text{Cov}(e_{is}, y_{i,t-1}) \right] = 0Cov(e~it​,yi,t−1​)=ct​[Cov(eit​,yi,t−1​)−T−t1​s=t+1∑T​Cov(eis​,yi,t−1​)]=0
ctc_tct​eite_{it}eit​

5

The cost of forward differencing: the final period has no future observations to difference against. With ppp lags, the effective sample is N(T−p−1)N(T - p - 1)N(T−p−1).
Helmert loses one observation per unit (the last period), yielding N(T−1) usable observations.\text{Helmert loses one observation per unit (the last period), yielding } N(T-1) \text{ usable observations.}Helmert loses one observation per unit (the last period), yielding N(T−1) usable observations.
NNN

6

Pooled OLS on the Helmert-transformed system. Consistent when slope homogeneity and strict exogeneity hold. For efficiency and robustness, system GMM is preferred.
Estimate A^=(∑i,tX~it′X~it)−1(∑i,tX~it′y~it)\text{Estimate } \hat{A} = \left( \sum_{i,t} \tilde{X}_{it}' \tilde{X}_{it} \right)^{-1} \left( \sum_{i,t} \tilde{X}_{it}' \tilde{y}_{it} \right)Estimate A^=(i,t∑​X~it′​X~it​)−1(i,t∑​X~it′​y~​it​)
y~it\tilde{y}_{it}y~​it​

Nickell bias magnitude

In a univariate AR(1) with true coefficient ρ\rhoρ, the within-group estimator has bias approximately −(1+ρ)/(T−1)-(1+\rho)/(T-1)−(1+ρ)/(T−1). For a quarterly panel with T=40T=40T=40 and ρ=0.8\rho=0.8ρ=0.8, this is about −0.046-0.046−0.046 - small but not negligible for impulse response analysis.

Notations

yity_{it}yit​

Endogenous vector

μi\mu_iμi​

Unit fixed effects

AjA_jAj​

Lag coefficient matrix

⋅~\tilde{\cdot}⋅~

Helmert transform

ctc_tct​

Helmert scaling factor

yˉi,t+\bar{y}_{i,t}^{+}yˉ​i,t+​

Forward mean

About these symbols

Endogenous vector: K×1K \times 1K×1 endogenous vector, unit iii, time ttt

Unit fixed effects: K×1K \times 1K×1 unit fixed effects

Lag coefficient matrix: K×KK \times KK×K lag-jjj coefficient matrix

Helmert transform: Helmert-transformed variable

Helmert scaling factor: Helmert scaling factor (T−t)/(T−t+1)\sqrt{(T-t)/(T-t+1)}(T−t)/(T−t+1)​

Forward mean: Forward mean of yiy_iyi​ from t+1t+1t+1 to TTT

    Transition checks

    Impact jump
    x0=Bε0,xh=AhBε0(h=1,2,…)x_0=B\varepsilon_0,\qquad x_h=A^hB\varepsilon_0\quad(h=1,2,\ldots)x0​=Bε0​,xh​=AhBε0​(h=1,2,…)
    ε0\varepsilon_0ε0​

    In a linear state-space representation, B maps the innovation into the contemporaneous state. A delayed variable has a zero row in B and moves only after A propagates the shock. A jump is therefore a timing restriction, not a charting artifact.

    A nonzero point at h=0 means the shock changes the plotted variable on impact. It is not the end of a smooth pre-shock segment.

    Do not smooth through h=0 when the model says the shock enters contemporaneously.

    Decay or hump
    rh=aρhorrh=a he−λhρh,∣ρ∣<1r_h=a\rho^h\quad\text{or}\quad r_h=a\,h e^{-\lambda h}\rho^h,\qquad |\rho|<1rh​=aρhorrh​=ahe−λhρh,∣ρ∣<1

    Stable eigenvalues shrink repeated applications of A. If a variable is reached through another state first, the response rises before the stable decay dominates, producing a hump-shaped path.

    Post-impact movement follows the model recursion. A hump means delayed propagation, not interpolation by the chart.

    Do not treat a hump as evidence of a linear ramp unless the model includes that ramp.

    Variable timing

    Innovation

    ε0≠0,εh=0 for h>0\varepsilon_0\ne 0,\qquad \varepsilon_h=0\ \text{for}\ h>0ε0​=0,εh​=0 for h>0
    ε0\varepsilon_0ε0​

    The shock is dated at horizon zero. A response at h=0 is an impact effect, not the end of a hidden ramp.

    State vector

    xh=AhBε0x_h=A^hB\varepsilon_0xh​=AhBε0​
    ε0\varepsilon_0ε0​

    A state can move on impact only through the relevant row of B; otherwise it moves after A propagates the shock.

    Reported response

    rh=CAhBε0+Dεhr_h=CA^hB\varepsilon_0+D\varepsilon_hrh​=CAhBε0​+Dεh​
    ε0\varepsilon_0ε0​

    The plotted variable can jump directly through D or indirectly through the state vector.

    Keep going

    Read next

    Continue with a related concept, model, or example.

    Theory model

    IS-LM Model

    a well-connected theoretical model two steps from here

    New angle: theoretical model →
    Macro by Mark
    Help
    Privacy PolicyTerms of UseEthics and Compliance

    © 2026 Mark Jayson Nation LLC