Theory¶
Panel Cointegrating Regression¶
The model estimated by PyCupFM is:
where the error \(e_{it}\) has a common factor structure:
Variables¶
- \(y_{it}\): dependent variable (I(1))
- \(x_{it}\): \(k \times 1\) vector of I(1) regressors with \(x_{it} = x_{i,t-1} + v_{it}\)
- \(F_t\): \(r \times 1\) vector of common factors — I(1) global stochastic trends
- \(\lambda_i\): \(r \times 1\) heterogeneous factor loadings
- \(u_{it}\): idiosyncratic error (stationary, may be serially correlated)
- \(\alpha_i\): unit-specific fixed effects
- \(\beta\): \(k \times 1\) homogeneous cointegrating coefficients
The 5 Estimators¶
1. LSDV (Within / Fixed-Effects)¶
Standard panel within estimator. Eliminates \(\alpha_i\) by demeaning:
where \(\tilde{X}_i = X_i - \bar{X}_i\). Biased and inconsistent when \(F_t \sim I(1)\).
2. Bai FM (Two-Step Fully Modified)¶
From Bai & Kao (2005), Equations 7–8. Non-iterative:
- Estimate LSDV → get \(\hat\beta_0\), extract factors \(\hat{F}\), \(\hat\Lambda\)
- Construct FM correction using Bartlett long-run covariance \(\hat\Omega\)
- Apply bias correction once
3. CupFM — Continuously-Updated FM ★ Recommended¶
From BKN (2009), Theorem 3, Equation 16. Iterates the Bai FM procedure:
Asymptotic distribution (BKN 2009, Theorem 3):
Exhibits the smallest bias in all BKN Monte Carlo experiments.
4. CupFM-bar (Z-bar Variant)¶
Uses the instrument \(\bar{Z}_i = \bar{x}_i - \hat{F}\hat\delta_i\) instead of \(X_i\).
5. CupBC (Continuously-Updated Bias-Corrected)¶
From BKN (2009), Theorem 2. Iterates plain Cup-LS:
then applies bias correction at convergence.
Long-Run Covariance Estimation¶
The long-run covariance matrix is estimated using kernel methods:
Available Kernels¶
| Kernel | Weight Function |
|---|---|
| Bartlett | \(w_j = 1 - \|j\|/(M+1)\) |
| Parzen | Smooth taper (cubic) |
| Quadratic Spectral | Andrews (1991) |
Bandwidth Selection¶
- Manual:
bandwidth=5(BKN default) - Auto (Newey-West): \(M = \lfloor 4(T/100)^{2/9} \rfloor\)
- Auto (Andrews): AR(1) plug-in rule
Factor Selection¶
The number of factors \(r\) is selected by minimizing the Bai & Ng (2002) information criterion:
where \(V(k, \hat{F}) = \frac{1}{NT}\sum_i\sum_t (e_{it} - \hat\lambda_i'\hat{F}_t)^2\).
References¶
- Bai, J., Kao, C. & Ng, S. (2009). Panel cointegration with global stochastic trends. Journal of Econometrics, 149(1), 82-99.
- Bai, J. & Kao, C. (2005). On the estimation and inference of a panel cointegration model with cross-sectional dependence. SSRN-1815227.
- Bai, J. & Ng, S. (2002). Determining the number of factors in approximate factor models. Econometrica, 70(1), 191-221.
- Andrews, D.W.K. (1991). Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica, 59(3), 817-858.