Hsiao test
hsiao.RdHsiao poolability test, as described by Hsiao (1986;2022).
Arguments
- formula
formulaobject forplm::plmfunction.- data
plm::pdata.frameordata.frameobject for input. Note that for thedata.framean additionalindexshould be given.- index
An
indexinput forplm::pdata.framein case thatdata.frameis given instead ofplm::pdata.frame.- ...
Rest arguments passed to
plm::plm. Note that'model'and'effect'can not be used in the currenthsiaofunction and in such a case an error will be triggered.
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.
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.
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.
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
##
## 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