Skip to content

hierarchical_panel

Jaromír Beneš edited this page Mar 20, 2026 · 1 revision

Hierarchical Panel (HierarchicalPanel)

Description

Hierarchical Bayesian panel VAR that allows for heterogeneity across units while sharing information through a hierarchical prior structure. Each unit has its own VAR parameters, but these are drawn from a common distribution whose hyperparameters are themselves estimated.

Technical Details

  • Each unit i has its own coefficient vector βᵢ and error covariance matrix Σᵢ
  • Unit-specific coefficients are drawn from a common distribution: βᵢ ~ N(b, λ₁Ω_b)
  • Hyperparameters (b, λ₁) are estimated from the data
  • Information sharing occurs through the hierarchical prior structure
  • Suitable for panels where units are heterogeneous but share common characteristics

User Settings (Hyperparameters)

Hierarchical Panel-Specific Settings

S0 (double)

  • Description: Inverse-Gamma shape parameter for overall tightness hyperparameter λ₁
  • Default: 0.001
  • Details: Shape parameter for the IG prior on λ₁. Small values provide diffuse prior on the common variance across units ?

V0 (double)

  • Description: Inverse-Gamma scale parameter for overall tightness hyperparameter λ₁
  • Default: 0.001
  • Details: Scale parameter for the IG prior on λ₁. Together with S0, controls the prior distribution of cross-unit heterogeneity ?

Inherited Base Settings

Burnin (double)

  • Description: Number of burn-in draws for posterior sampling
  • Default: 0
  • Details: Number of initial MCMC draws to discard before collecting posterior samples

StabilityThreshold (double)

  • Description: Threshold for maximum eigenvalue magnitude to ensure VAR stability
  • Default: Inf (no stability check)
  • Details: Maximum allowed eigenvalue magnitude; draws with eigenvalues exceeding this are rejected ?

MaxNumUnstableAttempts (double)

  • Description: Maximum number of unstable sampling attempts before giving up
  • Default: 1000
  • Details: If stability checking is enabled, this limits the number of consecutive unstable draws before termination ?

Panel VAR Hyperparameters

Lambda2 (double)

  • Description: Cross-variable weighting parameter for unit-specific priors
  • Default: 0.5
  • Details: Controls the relative tightness of priors on cross-variable coefficients vs. own-lag coefficients within each unit

Lambda3 (double)

  • Description: Lag decay parameter for unit-specific priors
  • Default: 1.0
  • Details: Controls the rate of decay of prior variance with lag length within each unit. Higher values = faster decay

Lambda4 (double matrix)

  • Description: Exogenous variable tightness parameter for unit-specific priors
  • Default: 100
  • Details: Controls the tightness of priors on exogenous variables and constants within each unit. Higher values = looser priors

Implementation Details

  • Three-level hierarchy:
    1. Data level: yᵢₜ = Xᵢₜβᵢ + εᵢₜ, εᵢₜ ~ N(0, Σᵢ)
    2. Unit level: βᵢ ~ N(b, λ₁Ω_b), Σᵢ ~ IW(S̃ᵢ, T)
    3. Hyperparameter level: b ~ N(β̄, (1/N)λ₁Ω_b), λ₁ ~ IG(s₀, v₀)
  • Sampling sequence:
    1. Draw common mean b from its conditional posterior
    2. Draw variance hyperparameter λ₁ from its conditional posterior
    3. Draw unit-specific parameters (βᵢ, Σᵢ) for each unit
  • Prior structure: Unit-specific priors Ω_b follow Minnesota-style structure with λ₂, λ₃, λ₄ parameters

Usage Recommendations

  • Cross-unit heterogeneity: Increase S0 and V0 for more diffuse priors on λ₁, allowing more heterogeneity ?
  • Strong pooling: Use smaller values of S0 and V0 to encourage more similar parameters across units ?
  • Standard panel applications: Use default hierarchical hyperparameters (S0=V0=0.001)
  • Unit-specific priors: Adjust λ₂, λ₃, λ₄ similar to Minnesota VAR guidelines
  • Sample size considerations: Requires sufficient observations per unit for stable estimation

Limitations

  • Cannot be used with dummy observations (CanHaveDummies = false)
  • Requires balanced panel data with sufficient time series length per unit ?
  • Computational intensity scales with number of units
  • Assumes common prior structure across all units (may be restrictive)

Comparison to Other Panel Estimators

  • vs. MeanOLSPanel: More flexible, allows for unit-specific error covariances
  • vs. NormalWishartPanel: Hierarchical structure provides automatic determination of pooling degree
  • vs. Cross-unit panels: No cross-unit spillovers, units are separable

Clone this wiki locally