Title: | Poolability Tests in Panel Data |
---|---|
Description: | Homogeneity tests of the coefficients in panel data. Currently, only the Hsiao test for determining coefficient homogeneity between the panel data individuals is implemented, as described in Hsiao (2022), "Analysis of Panel Data" (<doi:10.1017/9781009057745>). |
Authors: | Christos Adam [aut, cre] |
Maintainer: | Christos Adam <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2025-02-15 05:25:28 UTC |
Source: | https://github.com/cadam00/poobly |
Hsiao poolability test, as described by Hsiao (1986;2022).
hsiao(formula, data, index = NULL, ...)
hsiao(formula, data, index = NULL, ...)
formula |
|
data |
|
index |
An |
... |
Rest arguments passed to |
Hsiao (1986;2022) poolability/homogeneity test consists of three consecutive tests. One for testing if the slope and constant coefficients are same across the panel. If it is not the case, then a second test is conducted, with the heterogeneity of both slope and constant coefficients as alternative hypothesis. If this second hypothesis is not rejected, then the final third hypothesis is tested, where the null of the same slope and constant against the alternative of same slopes but different constants is tested.
hsiao
and list
object with hypotheses with their corresponding
F-statistics, degrees of freedom, and p-values.
Acknowledgments:
Dr. Kevin Tappe from the University of Stuttgart for useful suggestions regarding both the code and the documentation.
Hsiao, C. (1986) Analysis of Panel Data. 1st edn. Cambridge: Cambridge University Press (Econometric Society Monographs).
Hsiao, C. (2022) Analysis of Panel Data. 4th edn. Cambridge: Cambridge University Press (Econometric Society Monographs), pp. 43-49.
library(plm) data("Gasoline", package = "plm") x <- hsiao(lgaspcar ~ lincomep + lrpmg + lcarpcap, Gasoline) print(x) ## ## Hsiao Homogeneity Test ## ## Hypothesis| Null | Alternative ## ----------+------+--------------------------------------------- ## H1 |Pooled| H2 ## H2 | H3 | Heterogeneous intercepts & slopes ## H3 |Pooled|Heterogeneous intercepts & homogeneous slopes ## =============================================================== ## ## formula: lgaspcar ~ lincomep + lrpmg + lcarpcap ## ## Hypothesis F-statistic df1 df2 p-value ## 1 H1 129.3166 68 270 < 0.001 ## 2 H2 27.3352 51 270 < 0.001 ## 3 H3 83.9608 17 321 < 0.001
library(plm) data("Gasoline", package = "plm") x <- hsiao(lgaspcar ~ lincomep + lrpmg + lcarpcap, Gasoline) print(x) ## ## Hsiao Homogeneity Test ## ## Hypothesis| Null | Alternative ## ----------+------+--------------------------------------------- ## H1 |Pooled| H2 ## H2 | H3 | Heterogeneous intercepts & slopes ## H3 |Pooled|Heterogeneous intercepts & homogeneous slopes ## =============================================================== ## ## formula: lgaspcar ~ lincomep + lrpmg + lcarpcap ## ## Hypothesis F-statistic df1 df2 p-value ## 1 H1 129.3166 68 270 < 0.001 ## 2 H2 27.3352 51 270 < 0.001 ## 3 H3 83.9608 17 321 < 0.001