{"id":26692655,"url":"https://github.com/apoorvalal/synthlearners","last_synced_at":"2025-04-12T23:38:20.559Z","repository":{"id":262393170,"uuid":"886999364","full_name":"apoorvalal/synthlearners","owner":"apoorvalal","description":"fast synthetic control estimators for panel data problems","archived":false,"fork":false,"pushed_at":"2025-04-12T14:41:29.000Z","size":24773,"stargazers_count":19,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T23:38:17.281Z","etag":null,"topics":["causal-inference","econometrics","panel-data","synthetic-control"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apoorvalal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-12T01:49:30.000Z","updated_at":"2025-04-01T19:01:37.000Z","dependencies_parsed_at":"2025-02-23T09:24:04.757Z","dependency_job_id":"c1fbdf14-acca-48b6-aee1-003a6e1f85f8","html_url":"https://github.com/apoorvalal/synthlearners","commit_stats":null,"previous_names":["apoorvalal/synthlearners"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoorvalal%2Fsynthlearners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoorvalal%2Fsynthlearners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoorvalal%2Fsynthlearners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apoorvalal%2Fsynthlearners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apoorvalal","download_url":"https://codeload.github.com/apoorvalal/synthlearners/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"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":["causal-inference","econometrics","panel-data","synthetic-control"],"created_at":"2025-03-26T17:34:31.258Z","updated_at":"2025-04-12T23:38:20.539Z","avatar_url":"https://github.com/apoorvalal.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `synthlearners`: Scalable Synthetic Control Methods in Python\n\nsynthetic control methods powered by the [`pyensmallen`](https://github.com/apoorvalal/pyensmallen) library for fast optimisation.\nCheck out the `notebooks` directory for synthetic and real data examples.\n\n\n## installation\n\n```\npip install git+https://github.com/apoorvalal/synthlearners/\n```\n\nor git clone and run `uv pip install -e .` and make changes.\n\n## features\n\nfeatures are indicated by\n- [ ] pending; good first PR; contributions welcome\n- [x] done\n\n### weights\n  - [x] unit weights [`/solvers.py`]\n    - [x] simplex (Abadie, Diamond, Hainmueller [2010](https://www.tandfonline.com/doi/abs/10.1198/jasa.2009.ap08746?casa_token=HHoPpXX1iigAAAAA:zCB_ZwLLTs1uWBzAVrwgCKtA_FPZXdoqLoxKgZzGAvCCgLpA5WlFm4DphUiz2U_udE5GM329XdjWoQ), [2015](https://onlinelibrary.wiley.com/doi/full/10.1111/ajps.12116?casa_token=bKtsjsYAkAIAAAAA%3AuS7vADpexw4q0BACgWtaYDal1fwCI3k3bHruSUgCJyEVs_PrUlnmcenEK58f6QoqgCPBgZGTy0mssg))\n    - [x] lasso ([Hollingsworth and Wing 2024+](https://osf.io/fc9xt/))\n    - [x] ridge ([Imbens and Doudchenko 2016](https://www.nber.org/papers/w22791), [Arkhangelsky et al 2021](https://www.aeaweb.org/articles?id=10.1257/aer.20190159))\n    - [x] matching ([Imai, Kim, Wang 2023](https://onlinelibrary.wiley.com/doi/full/10.1111/ajps.12685?casa_token=vap307wR7DwAAAAA%3AHGX_puzkDArA-O-mTfxOedqsr1zdVH4VgwgBA8pi8LnzUg1IVVUHEeVrIcCZZ1gA7gfqsrebAgIEJg))\n    - [x] support intercept term ([Ferman and Pinto 2021](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE1596), Doudchenko and Imbens)\n    - [ ] entropy weights ([Hainmueller 2012](https://www.cambridge.org/core/journals/political-analysis/article/entropy-balancing-for-causal-effects-a-multivariate-reweighting-method-to-produce-balanced-samples-in-observational-studies/220E4FC838066552B53128E647E4FAA7), [Hirschberg and Arkhangelsky 2023](https://arxiv.org/abs/2311.13575), [Lal 2023](https://apoorvalal.github.io/files/papers/augbal.pdf))\n  - [x] with multiple treated units, match aggregate outcomes (default) or individual outcomes ([Abadie and L'Hour 2021](https://economics.mit.edu/sites/default/files/publications/A%20Penalized%20Synthetic%20Control%20Estimator%20for%20Disagg.pdf))\n  - [ ] time weights\n    - [ ] L2 weights (Arkhangelsky et al 2021)\n    - [ ] time-distance penalised weights (Imbens et al 2024)\n  - [ ] augmenting weights with outcome models ([Ben-Michael et al 2021](https://arxiv.org/abs/1811.04170))\n    - [x] matrix completion ([Athey et al 2021](https://arxiv.org/abs/1710.10251))\n    - [ ] latent factor models ([Xu 2017](https://yiqingxu.org/papers/english/2016_Xu_gsynth/Xu_PA_2017.pdf), Lal et al 2024)\n    - [ ] two-way kernel ridge weights ([Ben-Michael et al 2023](https://arxiv.org/abs/2110.07006))\n\n### inference\n- [x] jacknife confidence intervals (multiple treated units) [Arkhangelsky et al 2021)\n- [x] permutation test (Abadie et al 2010)\n- [ ] conformal inference ([Chernozhukov et al 2021](https://arxiv.org/abs/1712.09089))\n\n### visualisations\n  - [x] raw outcome time series with treated average and synthetic control\n  - [x] event study plot (treatment effect over time)\n  - [x] weight distributions\n\n\n\nContributions welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapoorvalal%2Fsynthlearners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapoorvalal%2Fsynthlearners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapoorvalal%2Fsynthlearners/lists"}