Package: phdid
Title: Partial Homogeneity in Staggered Difference-in-Differences
Version: 0.1.0
Authors@R: c(
    person("Rohan", "Wagle", email = "rohan.wagle_ug2023@ashoka.edu.in",
           role = c("aut", "cre", "cph")),
    person("Parush", "Arora", email = "parush.arora@ashoka.edu.in",
           role = c("aut", "cph")))
Description: In staggered difference-in-differences designs the
        treatment effect is a vector of cohort-time effects rather than
        a single number. Estimating each separately is unbiased but
        imprecise when some are equal, while pooling them all is
        precise but biased under genuine heterogeneity. This package
        treats the choice as a partition-selection problem on the
        cohort-time cells and provides two estimators for it: a
        Dirichlet process mixture fitted by a collapsed Gibbs sampler,
        whose posterior marginalises over the unknown partition and
        reports co-clustering probabilities, and an 'L0'-penalised
        estimator that returns a single partition and arises as the
        fixed-variance maximum a posteriori solution of the same model.
        Also provides tests for whether the cohort-time effects carry
        recoverable heterogeneity at all, sampler diagnostics including
        exact enumeration of the partition posterior for small designs,
        regularisation paths for both estimators, and a calibrated
        data-generating process. All estimators accept a vector of
        first-stage cohort-time effects with their joint covariance, so
        any heterogeneity-robust first-stage estimator may be used.
        Methods are described in Arora and Wagle (2026)
        <doi:10.2139/ssrn.7207083>.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Depends: R (>= 4.1.0)
Imports: graphics, grDevices, stats, utils
Suggests: did (>= 2.1.0), knitr, rmarkdown, testthat (>= 3.0.0)
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: 2026-10-17 07:19:00 UTC; root
Author: Rohan Wagle [aut, cre, cph],
  Parush Arora [aut, cph]
Maintainer: Rohan Wagle <rohan.wagle_ug2023@ashoka.edu.in>
