{
  "_id": "6aaba24a3d719c1f8406cad0",
  "Package": "phdid",
  "Title": "Partial Homogeneity in Staggered Difference-in-Differences",
  "Version": "0.1.0",
  "Authors@R": "c(\nperson(\"Rohan\", \"Wagle\", email = \"rohan.wagle_ug2023@ashoka.edu.in\",\nrole = c(\"aut\", \"cre\", \"cph\")),\nperson(\"Parush\", \"Arora\", email = \"parush.arora@ashoka.edu.in\",\nrole = c(\"aut\", \"cph\")))",
  "Description": "In staggered difference-in-differences designs the\ntreatment effect is a vector of cohort-time effects rather than\na single number. Estimating each separately is unbiased but\nimprecise when some are equal, while pooling them all is\nprecise but biased under genuine heterogeneity. This package\ntreats the choice as a partition-selection problem on the\ncohort-time cells and provides two estimators for it: a\nDirichlet process mixture fitted by a collapsed Gibbs sampler,\nwhose posterior marginalises over the unknown partition and\nreports co-clustering probabilities, and an 'L0'-penalised\nestimator that returns a single partition and arises as the\nfixed-variance maximum a posteriori solution of the same model.\nAlso provides tests for whether the cohort-time effects carry\nrecoverable heterogeneity at all, sampler diagnostics including\nexact enumeration of the partition posterior for small designs,\nregularisation paths for both estimators, and a calibrated\ndata-generating process. All estimators accept a vector of\nfirst-stage cohort-time effects with their joint covariance, so\nany heterogeneity-robust first-stage estimator may be used.\nMethods are described in Arora and Wagle (2026)\n<doi:10.2139/ssrn.7207083>.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr, rmarkdown",
  "URL": "https://github.com/ronwag2005/phdid",
  "BugReports": "https://github.com/ronwag2005/phdid/issues",
  "Config/roxygen2/version": "8.1.0",
  "Repository": "https://ronwag2005.r-universe.dev",
  "Date/Publication": "2026-09-17 05:47:21 UTC",
  "RemoteUrl": "https://github.com/ronwag2005/phdid",
  "RemoteRef": "HEAD",
  "RemoteSha": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-09-17 08:02:11 UTC",
    "User": "root"
  },
  "Author": "Rohan Wagle [aut, cre, cph],\nParush Arora [aut, cph]",
  "Maintainer": "Rohan Wagle <rohan.wagle_ug2023@ashoka.edu.in>",
  "_user": "ronwag2005",
  "_type": "src",
  "_file": "phdid_0.1.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/9190f04c28cdf36e0680639f3cd02c9c5ea45eb8d92502357e62142bceada3bd",
  "_filesize": 780954,
  "_sha256": "9190f04c28cdf36e0680639f3cd02c9c5ea45eb8d92502357e62142bceada3bd",
  "_expires": "2026-12-26T08:18:16.000Z",
  "_created": "2026-09-17T08:02:11.000Z",
  "_published": "2026-09-17T08:18:18.132Z",
  "_jobs": [
    {
      "job": 105124321745,
      "time": 175,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "10486362039"
    },
    {
      "job": 105124321907,
      "time": 198,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "10486777266"
    },
    {
      "job": 105124321771,
      "time": 151,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "10486408289"
    },
    {
      "job": 105124321750,
      "time": 236,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "10486464972"
    },
    {
      "job": 105122673375,
      "time": 355,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "10486396685"
    },
    {
      "job": 105124321776,
      "time": 124,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "10486861959"
    },
    {
      "job": 105124321792,
      "time": 143,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "10486127398"
    },
    {
      "job": 105124321821,
      "time": 119,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "10486682458"
    },
    {
      "job": 105124321846,
      "time": 159,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "10487130702"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667",
  "_status": "success",
  "_upstream": "https://github.com/ronwag2005/phdid",
  "_commit": {
    "id": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
    "author": "Rohan Wagle <rohan.wagle_ug2023@ashoka.edu.in>",
    "committer": "Rohan Wagle <rohan.wagle_ug2023@ashoka.edu.in>",
    "message": "Update the repository for the CRAN release\n\nphdid 0.1.0 was published on CRAN on 2026-09-15. The CRAN tarball is\nbyte-identical in shipped content to commit 4b5bad3, which is now\ntagged v0.1.0.\n\nREADME\n- Installation now leads with install.packages(\"phdid\") and keeps the\n  GitHub route for the development version.\n- Adds the CRAN version badge and the CRAN check-status badge, which\n  reflects the worst result across CRAN's check farm and so surfaces a\n  breakage on any flavour without anyone having to look.\n\nNEWS\n- Records the release date and cites the paper by DOI.\n- The \"Unreleased\" block listed the regularisation-path features as if\n  they were pending. They shipped in 0.1.0, so they are folded into the\n  release notes as their own section, and the \"Breaking\" note about\n  plot_alpha_sensitivity() is dropped, since nothing existed before\n  this release for it to break.\n\nCo-Authored-By: Claude Opus 5 <noreply@anthropic.com>\n",
    "time": 1789624041
  },
  "_maintainer": {
    "name": "Rohan Wagle",
    "email": "rohan.wagle_ug2023@ashoka.edu.in",
    "login": "ronwag2005",
    "description": "",
    "uuid": 227056718
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "did",
      "version": ">= 2.1.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "ronwag2005",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-33",
      "n": 1
    },
    {
      "week": "2026-34",
      "n": 2
    },
    {
      "week": "2026-35",
      "n": 1
    },
    {
      "week": "2026-36",
      "n": 1
    },
    {
      "week": "2026-37",
      "n": 12
    },
    {
      "week": "2026-38",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2026-09-07"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "ronwag2005",
      "count": 18,
      "uuid": 227056718
    }
  ],
  "_userbio": {
    "uuid": 227056718,
    "type": "user",
    "name": "Rohan Wagle",
    "followers": 1
  },
  "_downloads": {
    "count": 11,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/phdid"
  },
  "_devurl": "https://github.com/ronwag2005/phdid",
  "_searchresults": 0,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/phdid.html",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/ronwag2005/phdid",
  "_realowner": "ronwag2005",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-09-15"
    }
  ],
  "_exports": [
    "adjusted_rand",
    "alpha_for_groups",
    "alpha_sensitivity",
    "bayes_ph",
    "coclustering",
    "covariance_check",
    "enumerate_partitions",
    "expected_groups",
    "flex_twfe",
    "homogeneity_test",
    "l0_ph",
    "lambda_sensitivity",
    "ph_data",
    "ph_design",
    "ph_fit",
    "ph_rhat",
    "ph_sample",
    "ph_truth",
    "plot_coclustering",
    "plot_l0_path",
    "plot_placebo_band",
    "plot_sensitivity",
    "plot_sim_study",
    "point_partition",
    "pooled_twfe",
    "sim_study"
  ],
  "_help": [
    {
      "page": "adjusted_rand",
      "title": "Adjusted Rand index between two partitions",
      "topics": [
        "adjusted_rand"
      ]
    },
    {
      "page": "aggregate.bayes_ph",
      "title": "Aggregate cohort-time effects into a reported estimand",
      "topics": [
        "aggregate.bayes_ph",
        "aggregate.ph_fit"
      ]
    },
    {
      "page": "alpha_for_groups",
      "title": "Concentration parameter giving a target prior number of groups",
      "topics": [
        "alpha_for_groups",
        "expected_groups"
      ]
    },
    {
      "page": "alpha_sensitivity",
      "title": "Regularisation paths: how the estimates move with the tuning parameter",
      "topics": [
        "alpha_sensitivity",
        "lambda_sensitivity"
      ]
    },
    {
      "page": "bayes_ph",
      "title": "The Dirichlet Process partial-homogeneity estimator",
      "topics": [
        "bayes_ph"
      ]
    },
    {
      "page": "coclustering",
      "title": "Posterior co-clustering probabilities",
      "topics": [
        "coclustering"
      ]
    },
    {
      "page": "covariance_check",
      "title": "Compare exact and diagonal treatment of the covariance",
      "topics": [
        "covariance_check"
      ]
    },
    {
      "page": "enumerate_partitions",
      "title": "Exact partition posterior by enumeration",
      "topics": [
        "enumerate_partitions"
      ]
    },
    {
      "page": "flex_twfe",
      "title": "The fully flexible and fully pooled benchmarks",
      "topics": [
        "flex_twfe",
        "pooled_twfe"
      ]
    },
    {
      "page": "homogeneity_test",
      "title": "Is there heterogeneity to recover?",
      "topics": [
        "homogeneity_test"
      ]
    },
    {
      "page": "l0_ph",
      "title": "The l0-penalised partial-homogeneity estimator",
      "topics": [
        "l0_ph"
      ]
    },
    {
      "page": "ph_data",
      "title": "Assemble the inputs for a partial-homogeneity analysis",
      "topics": [
        "ph_data",
        "ph_data.data.frame",
        "ph_data.default",
        "ph_data.MP"
      ]
    },
    {
      "page": "ph_design",
      "title": "A calibrated partial-homogeneity design",
      "topics": [
        "ph_design"
      ]
    },
    {
      "page": "ph_fit",
      "title": "Fit the grouped model under a given partition",
      "topics": [
        "ph_fit"
      ]
    },
    {
      "page": "ph_rhat",
      "title": "Convergence diagnostics for the Gibbs sampler",
      "topics": [
        "ph_rhat"
      ]
    },
    {
      "page": "ph_sample",
      "title": "Draw one replication from a partial-homogeneity design",
      "topics": [
        "ph_sample"
      ]
    },
    {
      "page": "ph_truth",
      "title": "A partial-homogeneity parameter vector",
      "topics": [
        "ph_truth"
      ]
    },
    {
      "page": "plot_coclustering",
      "title": "Plot the posterior co-clustering matrix",
      "topics": [
        "plot.bayes_ph",
        "plot_coclustering"
      ]
    },
    {
      "page": "plot_l0_path",
      "title": "Plot the l0 solution path",
      "topics": [
        "plot_l0_path"
      ]
    },
    {
      "page": "plot_placebo_band",
      "title": "Plot event effects against a placebo noise band",
      "topics": [
        "plot_placebo_band"
      ]
    },
    {
      "page": "plot_sensitivity",
      "title": "Plot a regularisation path",
      "topics": [
        "plot_sensitivity"
      ]
    },
    {
      "page": "plot_sim_study",
      "title": "Plot Monte Carlo results across the true number of effects",
      "topics": [
        "plot_sim_study"
      ]
    },
    {
      "page": "plot.ph_fit",
      "title": "Plot cohort-time effects grouped by the selected partition",
      "topics": [
        "plot.ph_fit"
      ]
    },
    {
      "page": "point_partition",
      "title": "A single representative partition from the posterior",
      "topics": [
        "point_partition"
      ]
    },
    {
      "page": "sim_study",
      "title": "Monte Carlo study of the partial-homogeneity estimators",
      "topics": [
        "sim_study"
      ]
    }
  ],
  "_readme": "https://github.com/ronwag2005/phdid/raw/HEAD/README.md",
  "_rundeps": [],
  "_vignettes": [
    {
      "source": "mpdta.Rmd",
      "filename": "mpdta.html",
      "title": "Minimum wages and teen employment: recovering partial homogeneity",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The first stage",
        "Is there anything to recover?",
        "One partition to report",
        "Inference that admits the partition is uncertain",
        "Which groupings are firm?",
        "Checking the sampler",
        "How much does the prior matter?",
        "Watching the individual effects, not just the aggregate",
        "The event-study reading",
        "References"
      ],
      "created": "2026-08-16 20:11:47",
      "modified": "2026-09-07 08:35:32",
      "commits": 3
    },
    {
      "source": "simulation.Rmd",
      "filename": "simulation.html",
      "title": "When partial homogeneity helps, and when it does not",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The design",
        "The two dials",
        "Precision under partial homogeneity",
        "The separation boundary",
        "Where the two estimators genuinely differ",
        "Reproducing a published row",
        "References"
      ],
      "created": "2026-08-16 20:11:47",
      "modified": "2026-09-07 08:35:32",
      "commits": 3
    }
  ],
  "_score": 4.778151250383644,
  "_indexed": true,
  "_nocasepkg": "phdid",
  "_universes": [
    "ronwag2005"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-09-17T08:04:51.000Z",
      "distro": "resolute",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/4557183ac681da69eff11d68cb1207a0b2b79d2f955655c5d48e3b868214359e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-09-17T08:04:49.000Z",
      "distro": "resolute",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/025277ca97a0001d7003932fea2df12aa8515914a2eb19ee2dbd3bc75a8ca123",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-09-17T08:15:33.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/f3f8f3c53cb5e7bf2bdbf4f6eae25fce5687681acb93e31fb2ca633876825d00",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-09-17T08:16:46.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/567e1a8bc062b0e66f0f8de625931fbbffe81000d48d59c71658023ec7a4482c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-09-17T08:04:34.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/8569cd5318183794880754e9b2c8552beff3a9a8344938e020e5ddd4a5bc2032",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-09-17T08:03:36.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/994e4ab03f21610959344e864c542a4935e0ff405c62fb69724805f28db5673c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-09-17T08:03:33.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/3c1540d87480cf1ead3144803ff90a5bc65a8c9093b69d48c758c57c35cc65ae",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-09-17T08:03:50.000Z",
      "commit": "3f3733927f4eaa6a6d408e6f627f368e7136594b",
      "fileid": "https://r2.ropensci.org/72a25ae31d721ff982be2703e035a6b7f6a6e080da4e98495351ec82a54367f5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ronwag2005/actions/runs/35197038667"
    }
  ]
}