Type: | Package |
Title: | Poolability Tests in Panel Data |
Version: | 0.1.2 |
Maintainer: | Christos Adam <econp266@econ.soc.uoc.gr> |
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>). |
License: | GPL-3 |
Encoding: | UTF-8 |
URL: | https://github.com/cadam00/poobly, https://cadam00.github.io/poobly/ |
BugReports: | https://github.com/cadam00/poobly/issues |
Imports: | stats, methods, plm |
Suggests: | Rfast, Rfast2, knitr, rmarkdown, testthat (≥ 3.0.0) |
VignetteBuilder: | knitr, rmarkdown |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2025-05-09 17:32:31 UTC; Administrator |
Author: | Christos Adam |
Repository: | CRAN |
Date/Publication: | 2025-05-09 17:50:06 UTC |
Hsiao test
Description
Hsiao poolability test, as described by Hsiao (1986;2022).
Usage
hsiao(formula, data, index = NULL, ...)
Arguments
formula |
|
data |
|
index |
An |
... |
Rest arguments passed to |
Details
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.
Value
hsiao
and list
object with hypotheses with their corresponding
F-statistics, degrees of freedom, and p-values.
Note
Acknowledgments: We would like to acknowledge Dr. Kevin Tappe from the University of Stuttgart for useful suggestions regarding both the code and the documentation.
References
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.
Examples
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