{"id":18696629,"url":"https://github.com/sergiocorreia/ppmlhdfe","last_synced_at":"2026-01-24T20:54:17.258Z","repository":{"id":45502551,"uuid":"172845643","full_name":"sergiocorreia/ppmlhdfe","owner":"sergiocorreia","description":"Poisson pseudo-likelihood regression with multiple levels of fixed effects","archived":false,"fork":false,"pushed_at":"2025-07-29T15:03:06.000Z","size":4914,"stargazers_count":72,"open_issues_count":15,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-29T17:57:57.155Z","etag":null,"topics":["fixed-effects","high-dimensional-data","poisson-regression","separation","stata"],"latest_commit_sha":null,"homepage":"http://scorreia.com/software/ppmlhdfe/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergiocorreia.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2019-02-27T04:54:10.000Z","updated_at":"2025-07-29T15:03:10.000Z","dependencies_parsed_at":"2025-07-22T09:22:13.140Z","dependency_job_id":null,"html_url":"https://github.com/sergiocorreia/ppmlhdfe","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sergiocorreia/ppmlhdfe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiocorreia%2Fppmlhdfe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiocorreia%2Fppmlhdfe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiocorreia%2Fppmlhdfe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiocorreia%2Fppmlhdfe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergiocorreia","download_url":"https://codeload.github.com/sergiocorreia/ppmlhdfe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiocorreia%2Fppmlhdfe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fixed-effects","high-dimensional-data","poisson-regression","separation","stata"],"created_at":"2024-11-07T11:19:55.140Z","updated_at":"2026-01-24T20:54:17.252Z","avatar_url":"https://github.com/sergiocorreia.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ppmlhdfe`: Poisson pseudo-likelihood regression with multiple levels of fixed effects\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/sergiocorreia/ppmlhdfe?label=last%20version)\n![GitHub Release Date](https://img.shields.io/github/release-date/sergiocorreia/ppmlhdfe)\n![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/sergiocorreia/ppmlhdfe/latest)\n![StataMin](https://img.shields.io/badge/stata-%3E%3D%2012.1-blue)\n[![DOI](https://zenodo.org/badge/172845643.svg)](https://zenodo.org/badge/latestdoi/172845643)\n\n- Jump to: [`citation`](#citation) [`references`](#references) [`install`](#installation)\n- About `ppmlhdfe`: [Github Readme](https://github.com/sergiocorreia/ppmlhdfe/tree/master?tab=readme-ov-file#ppmlhdfe-poisson-pseudo-likelihood-regression-with-multiple-levels-of-fixed-effects) | [Working Paper](https://arxiv.org/abs/1903.01690) | [Stata Journal](https://doi.org/10.1177/1536867X20909691) | [Help File](http://scorreia.com/help/ppmlhdfe.html) | [Undocumented Options](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/undocumented.md)\n- About nonexistence of estimates: [Working Paper](https://arxiv.org/abs/1903.01633) | [Primer](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/nonexistence_primer.md) | [Examples](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/nonexistence_examples.md) | [Software Benchmarks](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/nonexistence_benchmarks.md)\n\n**ppmlhdfe** is a Stata package that implements Poisson pseudo-maximum likelihood regressions (PPML) with multi-way fixed effects, as described in [Correia, Guimarães, Zylkin (2019a)](http://scorreia.com/research/ppmlhdfe.pdf). The estimator employed is robust to statistical separation and convergence issues, due to the procedures developed in [Correia, Guimarães, Zylkin (2019b)](http://scorreia.com/research/separation.pdf).\n\n## Recent updates\n\n- August 2025: added [comprehensive examples](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/nonexistence_examples.md) of how `ppmlhdfe` handles nonexistence of ML estimates, including for Logit and Multinomial Logit models\n- **Version 2.3.3 02nov2025:** minor bugfix: `predict ..., eta` and `predict ..., mu` previously didn't set the predicted values to missing for observations dropped due to separation or singletons, _if_ the call to `ppmlhdfe` had no fixed effects.\n- **Version 2.3.1 26jun2025:** minor change: add `guess(variable \u003cvarname\u003e)`` option as an alternative initialization method\n- **Version 2.3 27jun2021:** minor changes due to reghdfe's v6 update. Currently, ppmlhdfe is still using the code from reghdfe v5, which the new version ships with. A port is planned at some point in the future, but because some Mata functions changed their behavior, this needs to be done carefully.\n- **Version 2.2 02aug2019:** major speedups due to improved IRLS acceleration (see [page 7 of the paper](https://arxiv.org/pdf/1903.01690.pdf)) and due to faster separation checks.\n- **Version 2.1 04apr2019:** added experimental [step-halving](https://journal.r-project.org/archive/2011/RJ-2011-012/index.html). Not as useful for Poisson models as with other GLMs, so it's turned off by default. You can enable it by including the option `use_step_halving(1)`. Other options you can set are `step_halving_memory(0.9)` and `max_step_halving(2)` (default values in parenthesis).\n\n\n## Citation\n\n[(Download BibTex file here)](https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/ppmlhdfe.bib)\n\n#### As text\n\n\u003cul\u003e\n\u003cli\u003e\nSergio Correia, Paulo Guimarães, Thomas Zylkin: “Verifying the existence of maximum likelihood estimates for generalized linear models”, 2019; \u003ca href='http://arxiv.org/abs/1903.01633'\u003earXiv:1903.01633\u003c/a\u003e.\n\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cul\u003e\n\u003cli\u003e\nSergio Correia, Paulo Guimarães, Thomas Zylkin. Fast Poisson estimation with high-dimensional fixed effects. The Stata Journal. 2020;20(1):95-115. doi:10.1177/1536867X20909691\n\u003c/li\u003e\n\u003c/ul\u003e\n\n#### As BibTex\n\n```bibtex\n@Misc{ExistenceGLM,\n  Author = {Correia, Sergio and Guimar{\\~a}es, Paulo and Zylkin, Thomas},\n  Title = {Verifying the existence of maximum likelihood estimates for generalized linear models},\n  Year = {2019},\n  Eprint = {arXiv:1903.01633},\n}\n\n@article{ppmlhdfe,\n  Author = {Correia, Sergio and Guimar{\\~a}es, Paulo and Zylkin, Thomas},\n  Title ={{Fast Poisson estimation with high-dimensional fixed effects}},\n  Journal = {The Stata Journal},\n  Volume = {20},\n  Number = {1},\n  Pages = {95-115},\n  Year = {2020},\n  DOI = {10.1177/1536867X20909691},\n  URL = {https://doi.org/10.1177/1536867X20909691},\n  eprint = {https://doi.org/10.1177/1536867X20909691}\n}\n```\n\n\n## References\n\nQuick information on the command can be glanced from the [help file](http://scorreia.com/help/ppmlhdfe.html).\n\nFor detailed information:\n\n- The [ppmlhdfe paper](http://scorreia.com/research/ppmlhdfe.pdf) explains the command in depth, provides examples, etc.\n- The paper on [statistical separation](http://scorreia.com/research/separation.pdf) discusses the crucial step of solving the separation issue, that can otherwise lead to incorrect convergence (or no convergence) in Poisson and other GLM models.\n\nFor introductory guides on separation, and on how `ppmlhdfe` internally address it, see the following documents:\n\n- [Separation primer](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/separation_primer.md): a quick practical introduction to separation in Poisson models.\n- [Separation benchmarks](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/separation_benchmarks.md): shows how separation affects all common statistical packages.\n- [Undocumented options](https://github.com/sergiocorreia/ppmlhdfe/blob/master/guides/undocumented.md): this pages briefly lists otherwise undocumented options of `ppmlhdfe`, which might be useful for advanced users.\n\n\n## Installation\n\n`ppmlhdfe` requires the latest versions of [`ftools`](https://github.com/sergiocorreia/ftools) and [`reghdfe`](https://github.com/sergiocorreia/reghdfe).\n\nTo install stable versions from SSC:\n\n```stata\ncap ado uninstall ftools\ncap ado uninstall reghdfe\ncap ado uninstall ppmlhdfe\n\nssc install ftools\nssc install reghdfe\nssc install ppmlhdfe\n\nclear all\nftools, compile\nreghdfe, compile\n\n* Test program\nsysuse auto, clear\nreghdfe price weight, a(turn)\nppmlhdfe price weight, a(turn)\n```\n\nTo install the latest versions from Github:\n\n```stata\n* Install ftools\ncap ado uninstall ftools\nnet install ftools, from(\"https://raw.githubusercontent.com/sergiocorreia/ftools/master/src/\")\n\n* Install reghdfe\ncap ado uninstall reghdfe\nnet install reghdfe, from(\"https://raw.githubusercontent.com/sergiocorreia/reghdfe/master/src/\")\n\n* Install ppmlhdfe\ncap ado uninstall ppmlhdfe\nnet install ppmlhdfe, from(\"https://raw.githubusercontent.com/sergiocorreia/ppmlhdfe/master/src/\")\n\n* Create compiled files\nftools, compile\nreghdfe, compile\n\n* Check versions\nppmlhdfe, version\n\n* Clear programs already in memory\nprogram drop _all\n\n* Test program\nsysuse auto, clear\nreghdfe price weight, a(turn)\nppmlhdfe price weight, a(turn)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiocorreia%2Fppmlhdfe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiocorreia%2Fppmlhdfe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiocorreia%2Fppmlhdfe/lists"}