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
Run the code above in your browser using DataLab