{"id":24374838,"url":"https://github.com/cadam00/poobly","last_synced_at":"2025-04-10T19:12:21.962Z","repository":{"id":271941153,"uuid":"915049167","full_name":"cadam00/poobly","owner":"cadam00","description":"Poolability Tests in Panel Data","archived":false,"fork":false,"pushed_at":"2025-01-14T21:06:34.000Z","size":2314,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T16:54:03.641Z","etag":null,"topics":["homogeneity","hsiao-test","panel-data","r","r-package"],"latest_commit_sha":null,"homepage":"https://cadam00.github.io/poobly/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadam00.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-10T21:19:45.000Z","updated_at":"2025-01-18T16:21:32.000Z","dependencies_parsed_at":"2025-01-19T05:41:33.798Z","dependency_job_id":null,"html_url":"https://github.com/cadam00/poobly","commit_stats":null,"previous_names":["cadam00/poobly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fpoobly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fpoobly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fpoobly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fpoobly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadam00","download_url":"https://codeload.github.com/cadam00/poobly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279897,"owners_count":21077408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["homogeneity","hsiao-test","panel-data","r","r-package"],"created_at":"2025-01-19T05:41:29.358Z","updated_at":"2025-04-10T19:12:21.957Z","avatar_url":"https://github.com/cadam00.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/poobly)](https://CRAN.R-project.org/package=poobly)\n[![Developmental version](https://img.shields.io/badge/devel%20version-0.1.1-blue.svg)](https://github.com/cadam00/poobly)\n[![R-CMD-check](https://github.com/cadam00/poobly/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cadam00/poobly/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/cadam00/poobly/graph/badge.svg)](https://app.codecov.io/gh/cadam00/poobly)\n\u003c!-- badges: end --\u003e\n\n# **Hsiao Poolability test ([1986](#ref-hsiao1986);[2022](#ref-hsiao2022)) in R**\n\n## **Install**\n\nThe development version of the package can be installed via\n``` r\nif (!require(remotes)) install.packages(\"remotes\")\nremotes::install_github(\"cadam00/poobly\")\n```\n\n\u003c!--\n## **Citation**\n\nTo cite the official [(CRAN)](https://cran.r-project.org/) version of the\npackage, please use\n\n\u003cblockquote\u003e\n\u003cp\u003eAdam, C. (2025). corbouli: Corbae-Ouliaris Frequency Domain\nFiltering. R package version 0.1.4. doi:\u003ca\nhref=\"https://doi.org/10.32614/CRAN.package.corbouli\"\nclass=\"uri\"\u003e10.32614/CRAN.package.corbouli\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n--\u003e\n\n## **Hsiao Poolability test**\n\nThe Hsiao poolability/homogeneity test (Hsiao [1986](#ref-hsiao1986);\n[2022](#ref-hsiao2022)) for panel data is used to determine the\nhomogeneity of coefficients across individuals in panel data. The test is\ncomposed of three consecutive hypotheses. The hypothesis that slope and\nintercept (constant) coefficients are the same across the panel is initially\ntested. If this hypothesis is not rejected, then the total homogeneity (pool) of\nboth slopes and intercepts is concluded. If the first hypothesis is rejected,\nthe second hypothesis tests the homogeneity of the slope coefficients. If this\nsecond hypothesis is rejected, different slope coefficients for all individuals\nare indicated, suggesting total heterogeneity. If this hypothesis is not\nrejected, then homogeneity of slope coefficients is implied. If this second\nhypothesis is not rejected, then the the third hypothesis tests the homogeneity\nof the intercept coefficients across individuals is performed. If\nthis last hypothesis is not rejected, then total homogeneity is resulted. If\nthis last hypothesis is rejected, equal slopes but different intercepts across\nindividuals are indicated. The current implementation is derived from Hsiao\n([2022](#ref-hsiao2022)). This procedure is capitulated in Figure\n[1](#ref-Figure1) and Table [1](#ref-table1).\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"vignettes/figure1.png\"\n    alt=\"Fig. 1: Hsiao homogeneity hypothesis testing flow chart.\"\n    width=\"100%\"/\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"ref-Figure1\"\u003e\u003c/span\u003e\nFig. 1: Hsiao homogeneity hypothesis testing flow chart.\n\u003c/p\u003e\n\n\u003ctable style=\"width: 368px; vertical-align: middle;\ntext-align: center; margin-left: auto; margin-right: auto;\" border=\"1\"\nalign=\"center\"\u003e\n\u003ctbody\u003e\n\u003ctr style=\"height: 26.75px;\"\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003e\n                                              \u0026nbsp;\u003cb\u003eHypothesis\u003c/b\u003e\u003c/td\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003e\u003cb\u003eNull\u003c/b\u003e\u003c/td\u003e\n\u003ctd style=\"width: 186.65px; height: 26px;\" align=\"center\"\u003e\u003cb\u003e\n                                                            Alternative\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr style=\"height: 26px;\" align=\"center\"\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003e\u0026nbsp;\u003cb\u003eH\u003csub\u003e1\u003c/sub\u003e\n                                                                       \u003c/b\u003e\u003c/td\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003ePooled\u003c/td\u003e\n\u003ctd style=\"width: 186.65px; height: 26px;\" align=\"center\"\u003eH\u003csub\u003e2\u003c/sub\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tr\u003e\n\u003ctr style=\"height: 26px;\" align=\"center\"\u003e\n\u003ctd style=\"width: 176.65px; height: 26px;\" align=\"center\"\u003e\u0026nbsp;\u003cb\u003eH\u003csub\u003e2\u003c/sub\u003e\n                                                                       \u003c/b\u003e\u003c/td\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003eH\u003csub\u003e3\u003c/sub\u003e\u003c/td\u003e\n\u003ctd style=\"width: 186.65px; height: 26px;\" align=\"center\"\u003e\n                                          Heterogeneous intercepts \u0026 slopes\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tr\u003e\n\u003ctr style=\"height: 26px;\" align=\"center\"\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003e\u0026nbsp;\u003cb\u003eH\u003csub\u003e3\u003c/sub\u003e\n                                                                       \u003c/b\u003e\u003c/td\u003e\n\u003ctd style=\"width: 136.65px; height: 26px;\" align=\"center\"\u003ePooled\u003c/td\u003e\n\u003ctd style=\"width: 186.65px; height: 26px;\" align=\"center\"\u003e\n                              Heterogeneous intercepts \u0026 Homogeneous slopes\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp align=\"center\"\u003e\n  \u003cspan class=\"nocase\" id=\"ref-table1\"\u003e\n    Table 1: Hsiao homogeneity hypothesis testing table.\n  \u003c/span\u003e\n\u003c/p\u003e\n\n## **Example**\n\nFor this example, the data `Gasoline` from \u003cb\u003eplm\u003c/b\u003e R package will be\nused.\n\n``` r\n# Import poobly and plm packages to workspace\nlibrary(poobly)\nlibrary(plm)\n\n# Import \"Gasoline\" dataset\ndata(\"Gasoline\", package = \"plm\")\n\n# Print first 6 rows\nhead(Gasoline)\n```\n```\n##   country year lgaspcar  lincomep      lrpmg  lcarpcap\n## 1 AUSTRIA 1960 4.173244 -6.474277 -0.3345476 -9.766840\n## 2 AUSTRIA 1961 4.100989 -6.426006 -0.3513276 -9.608622\n## 3 AUSTRIA 1962 4.073177 -6.407308 -0.3795177 -9.457257\n## 4 AUSTRIA 1963 4.059509 -6.370679 -0.4142514 -9.343155\n## 5 AUSTRIA 1964 4.037689 -6.322247 -0.4453354 -9.237739\n## 6 AUSTRIA 1965 4.033983 -6.294668 -0.4970607 -9.123903\n```\n\nA `pdata.frame` or a `data.frame` object is expected as and a formula are\nrequired as minimum essential input for the `hsiao` function. Note that\n`data.frame` object input should be able to be transformed as `pdata.frame`\nobject and `index` input can be used as well. For more about `pdata.frame` see\nat `plm::pdata.frame`.\n\n\n```r\n# Hsiao hypothesis testing\nx \u003c- hsiao(lgaspcar ~ lincomep + lrpmg + lcarpcap, Gasoline)\nprint(x)\n```\n```\n## \n##                     Hsiao Homogeneity Test\n## \n## Hypothesis| Null |                 Alternative                 \n## ----------+------+---------------------------------------------\n##     H1    |Pooled|                    H2                       \n##     H2    |  H3  |      Heterogeneous intercepts \u0026 slopes      \n##     H3    |Pooled|Heterogeneous intercepts \u0026 homogeneous slopes\n## ===============================================================\n## \n## formula: lgaspcar ~ lincomep + lrpmg + lcarpcap\n## \n##     Hypothesis  F-statistic     df1         df2       p-value  \n##   1     H1       129.3166       68          270       \u003c 0.001  \n##   2     H2        27.3352       51          270       \u003c 0.001  \n##   3     H3        83.9608       17          321       \u003c 0.001\n```\n\nAccording to this result, the coefficients of the given countries have both\nheterogeneous intercept \u0026 slope. In detail, the first hypothesis, $H_1$, is\nrejected in 1% statistical significance level, indicating strong evidence\nagainst the $H_1$. Then, the second hypothesis, $H_2$, is tested and rejected as\nwell in 1% statistical significance level. This is the end of the testing and so\nthere is strong evidence that both intercept and slope are heterogeneous.\n\n## **References**\n\n\u003cspan class=\"nocase\" id=\"ref-hsiao1986\"\u003e\nHsiao, C. (1986) \u003cem\u003eAnalysis of Panel Data\u003c/em\u003e. 1st edn. Cambridge: Cambridge\nUniversity Press (Econometric Society Monographs).\u003cbr\u003e\n\n\u003cspan class=\"nocase\" id=\"ref-hsiao2022\"\u003e\nHsiao, C. (2022) \u003cem\u003eAnalysis of Panel Data\u003c/em\u003e. 4th edn. Cambridge: Cambridge\nUniversity Press (Econometric Society Monographs), pp. 43-49.\ndoi:\u003ca href=\"https://doi.org/10.1017/9781009057745\"\u003e10.1017/9781009057745\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadam00%2Fpoobly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadam00%2Fpoobly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadam00%2Fpoobly/lists"}