{"id":50772034,"url":"https://github.com/bernardodionisi/differences","last_synced_at":"2026-06-29T00:00:43.593Z","repository":{"id":62864861,"uuid":"563160841","full_name":"bernardodionisi/differences","owner":"bernardodionisi","description":"difference-in-differences in Python","archived":false,"fork":false,"pushed_at":"2026-04-12T20:39:53.000Z","size":14583,"stargazers_count":110,"open_issues_count":9,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-06-13T17:09:59.981Z","etag":null,"topics":["causal-inference","difference-in-differences","econometrics","panel-data"],"latest_commit_sha":null,"homepage":"https://bernardodionisi.github.io/differences/latest/","language":"Python","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/bernardodionisi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-08T02:59:17.000Z","updated_at":"2026-04-29T08:25:50.000Z","dependencies_parsed_at":"2023-12-09T16:23:15.373Z","dependency_job_id":"d969aed9-c846-44b9-baa6-a344396238ba","html_url":"https://github.com/bernardodionisi/differences","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"2b6acc94cd37105893ba9dc1f9a48e37fb916c4f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bernardodionisi/differences","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardodionisi%2Fdifferences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardodionisi%2Fdifferences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardodionisi%2Fdifferences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardodionisi%2Fdifferences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernardodionisi","download_url":"https://codeload.github.com/bernardodionisi/differences/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardodionisi%2Fdifferences/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34907985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["causal-inference","difference-in-differences","econometrics","panel-data"],"created_at":"2026-06-11T20:00:25.090Z","updated_at":"2026-06-29T00:00:43.586Z","avatar_url":"https://github.com/bernardodionisi.png","language":"Python","funding_links":[],"categories":["Causal Inference and Econometrics"],"sub_categories":["Frontier Tools"],"readme":"\u003cimg src=\"./docs/imgs/logo/bw/logo_name_bw.png\" alt=\"drawing\" width=\"200\"\nstyle=\"display: block;margin-left: auto;margin-right: auto;width: 80%;\"/\u003e\n\ndifference-in-differences estimation and inference for Python\n\n**For the following use cases**\n\n- Balanced panels, unbalanced panels \u0026 repeated cross-section\n- Two + Multiple time periods\n- Fixed + Staggered treatment timing\n- Binary + Multi-Valued treatment\n- Heterogeneous treatment effects \u0026 triple difference\n- Parallelized estimation \u0026 multiplier bootstrap (joblib, via `n_jobs`)\n\nsee the [Documentation](https://bernardodionisi.github.io/differences/latest/) for more details.\n\n## Installing\n\nThe latest release can be installed using pip\n\n```bash\npip install differences\n```\n\nrequires Python \u003e= 3.10\n\n## Quick Start\n\n### ATTgt\n\nthe ATTgt class implements the estimation procedures suggested by [Callaway and Sant'Anna (2021)\n](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948), [Sant'Anna and Zhao\n(2020)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620301901) and the\nmulti-valued treatment case discussed\nin [Callaway, Goodman-Bacon \u0026 Sant'Anna (2021)](https://arxiv.org/abs/2107.02637)\n\n```python\nimport differences\n\ndf = differences.generate_data()  # requires the [all] extra: pip install differences[all]\n\natt_gt = differences.ATTgt(data=df, cohort_column='cohort')\n\natt_gt.fit(formula='y', n_jobs=-1)\n\natt_gt.aggregate('event')\n```\n\n*differences* ATTgt was inspired by\n- Callaway \u0026 Sant'Anna's [did](https://github.com/bcallaway11/did)\n- Sant'Anna and Zhao's [DRDID](https://github.com/pedrohcgs/DRDID)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernardodionisi%2Fdifferences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernardodionisi%2Fdifferences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernardodionisi%2Fdifferences/lists"}