{"id":32348390,"url":"https://github.com/gregorsteiner/staggeredsynthdid","last_synced_at":"2025-10-24T07:53:56.268Z","repository":{"id":61691462,"uuid":"529169521","full_name":"gregorsteiner/StaggeredSynthDiD","owner":"gregorsteiner","description":"Synthetic DiD estimation in staggered adoption settings","archived":false,"fork":false,"pushed_at":"2025-06-11T07:13:02.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T08:28:07.058Z","etag":null,"topics":["causal-inference","difference-in-differences","staggered-adoption","synthetic-control"],"latest_commit_sha":null,"homepage":"","language":"R","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/gregorsteiner.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}},"created_at":"2022-08-26T08:03:16.000Z","updated_at":"2025-06-11T07:13:06.000Z","dependencies_parsed_at":"2022-10-20T05:15:26.785Z","dependency_job_id":null,"html_url":"https://github.com/gregorsteiner/StaggeredSynthDiD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregorsteiner/StaggeredSynthDiD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorsteiner%2FStaggeredSynthDiD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorsteiner%2FStaggeredSynthDiD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorsteiner%2FStaggeredSynthDiD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorsteiner%2FStaggeredSynthDiD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorsteiner","download_url":"https://codeload.github.com/gregorsteiner/StaggeredSynthDiD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorsteiner%2FStaggeredSynthDiD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280761859,"owners_count":26386245,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"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","staggered-adoption","synthetic-control"],"created_at":"2025-10-24T07:53:54.393Z","updated_at":"2025-10-24T07:53:56.260Z","avatar_url":"https://github.com/gregorsteiner.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StaggeredSynthDiD: Synthetic Difference-in-Differences Estimation in Staggered Adoption Settings\n\nThis package is a simple extension of the [**synthdid**](https://synth-inference.github.io/synthdid/) package. It implements the Synthetic Difference-in-Differences (DiD) estimator by Arkhangelsky et al. (2021) for staggered adoption settings. As proposed in the Appendix of Arkhangelsky et al. (2021), the estimator is applied repeatedly, once for every adoption date, and a weighted average is calculated.\n\n### Installation\n\nThe current development version can be installed from Github:\n\n```R\ndevtools::install_github(\"gregorsteiner/StaggeredSynthDiD\")\n```\n\n\n### Example\n\n```R\n# simulate simple example dataset with staggered treatment\nset.seed(1)\nN \u003c- 10 # number of units\nTT \u003c- 10 # number of time periods\ntau \u003c- 0.5 # actual treatment effect\ndata \u003c- data.frame(\"Unit\" = rep(1:N, each = TT),\n                   \"Time\" = rep(1:TT, N),\n                   \"W\" = 0)\ndata \u003c- within(data, {\n  # add staggered treatment (for units 1, 2, and 3 with different start timing)\n  W[Unit == 1 \u0026 Time \u003e= 3] \u003c- 1\n  W[Unit == 2 \u0026 Time \u003e= 4] \u003c- 1\n  W[Unit == 3 \u0026 Time \u003e= 5] \u003c- 1\n  # dependent variable\n  Y \u003c- tau * W + rnorm(N * TT)\n})\n\n# use function\nStaggeredSynthDiD(data)\n\n```\n\n\n### References\nArkhangelsky, Dmitry, Susan Athey, David A. Hirshberg, Guido W. Imbens, and Stefan Wager. 2021. \"Synthetic Difference-in-Differences.\" American Economic Review, 111 (12): 4088-4118.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorsteiner%2Fstaggeredsynthdid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorsteiner%2Fstaggeredsynthdid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorsteiner%2Fstaggeredsynthdid/lists"}