Tests the null hypothesis that all slope coefficients are identical across cross-sectional units, against the alternative of heterogeneous slopes. Implements the Swamy (1970) chi-square test and the Pesaran & Yamagata (2008) standardised dispersion statistic.
swamy_test(object)An object of class dcce_swamy with elements S_stat,
delta_stat, df, p_swamy, p_delta, N, k.
A dcce_fit object (typically with model = "mg",
"cce", or "dcce").
The Swamy statistic is $$\tilde{S} = \sum_{i=1}^N (\hat\beta_i - \hat\beta^*)' \frac{X_i' M_\tau X_i}{\hat\sigma_i^2} (\hat\beta_i - \hat\beta^*),$$ where \(\hat\beta_i\) is the unit-level OLS estimate, \(\hat\beta^*\) is the weighted pooled estimate, and \(M_\tau = I - \tau(\tau'\tau)^{-1}\tau'\) projects off the intercept. Under \(H_0\) (homogeneous slopes), \(\tilde{S}\) is asymptotically \(\chi^2_{k(N-1)}\).
Pesaran & Yamagata (2008) propose a standardised version that is asymptotically standard normal: $$\tilde\Delta = \sqrt{N} \, \frac{N^{-1}\tilde{S} - k}{\sqrt{2k}}.$$
Swamy, P. A. V. B. (1970). Efficient inference in a random coefficient regression model. Econometrica, 38(2), 311-323.
Pesaran, M. H., & Yamagata, T. (2008). Testing slope homogeneity in large panels. Journal of Econometrics, 142(1), 50-93.