cdid models and comparisons
cdid combines familiar treatment-effect specifications with chained comparisons and explicit handling of selective observation. The scope of each match matters. A package can implement several estimators, and a match for one specification does not imply that every option in that package has been reproduced.
This table describes the R implementation, version 1.3.0.0. The Stata package 1.0.0.0 is available too. Its correspondence guide records option mappings and differences.
Read the matched commands and results alongside this summary. For observation assumptions, see what handling an incomplete panel requires.
Download JSON · Download Markdown
R cdid 1.3.0.0 · Reviewed 2026-11-16 · Versioned source
Available capabilities
Connect overlapping outcome histories
Combine supported within-unit changes across date pairs by GMM, with their covariance. Identification requires valid observation and parallel-trends restrictions, suitable controls, and sufficient support.
Adjust for selective observation
Choose observation weighting, actual-change imputation, or augmented reconstruction under conditional representativeness of mean changes and the documented model, support, and clipping conditions.
Choose treatment IPW, OR, or DR separately
Treatment weighting, counterfactual outcome regression, and doubly robust treatment adjustment are separate from the missing-outcome adjustment. The built-in conditional observation routes support all nine combinations.
Declare the study population
For cohort/adoption fits, an external unit table can include units observed once or never. Required cohort, covariate, weight and cluster information depends on the selected adjustment. The static switching route has separate data requirements.
Chain across different cohort observation windows
Cross-pair comparisons can connect target and control changes measured over different intervals under the declared control parallel-trends restrictions. chain_report() identifies contributing comparisons and unavailable cells.
Estimate static binary switching effects
Use current binary treatment status for effects at entry and exit under no carryover. This route has its own input requirements and switcher-weighted aggregate; it is not a dynamic switching model.
How the missingness assumptions relate
The foundational chained-DiD framework
Bellégo, Benatia and Dortet-Bernadet’s chained DiD paper provides the foundational framework for chained difference-in-differences with incomplete outcome histories. It explicitly formalizes missing-trends assumptions, distinguishes representativeness of outcome changes from representativeness of levels, and establishes identification, estimation and inference using overlapping incomplete panels. Its conditional extensions address selection on observed characteristics. This framework underlies cdid’s treatment of missing outcomes.
Linear fixed effects and mean-change representativeness
In an additive linear model with correctly specified conditional mean changes, residuals with mean zero at every date conditional jointly on cohort, covariates, the unit effect, and the full observation history imply conditional mean representativeness of observed pairwise changes. This supplies a model-based sufficient condition for the mean form of the chained-DiD missing-trends restriction. Pairwise mean restrictions and full-history exogeneity are not identical, and selection on covariates requires the appropriate population averaging. This is a sufficient reconstruction of the connection, not a formal observation-history assumption explicitly stated in Wooldridge (2025), section 10.2.
Which estimators can be reproduced?
| Method or software | Relationship | Scope of the match |
|---|---|---|
| Callaway-Sant'Anna: R did | Direct delegation | mode = 'ordinary' delegates to did, including repeated cross sections. Chained mode agrees only in the documented matched cases, after aligning sample, comparison group, covariates, reference period, and aggregation. |
| Callaway-Sant'Anna: Stata csdid | Matched implementation comparison | Use the corresponding R calculation in ordinary mode or a documented matched chained case. Align the two-date samples, controls, nuisance fits, reference periods, and aggregation; cdid does not delegate to Stata. |
| Wooldridge: linear etwfe and jwdid | Matched linear equivalence | Use est_method = 'reg' with the cohort_time_fe preset. Match unit and date effects, unrestricted treated cohort-date effects, never-treated or not-yet-treated controls, and optional time-invariant covariates. Requires a never-treated cohort, equal unit weights, and zero anticipation. |
| Sun-Abraham: sunab and eventstudyinteract | Matched specification and recorded benchmark | The cohort_time_fe preset with never-treated controls recovers the saturated linear cohort-event specification with the same reference period. The guide records complete-panel post-treatment cell comparisons against R fixest::sunab. |
| Gardner and Borusyak-Jaravel-Spiess | Complete-panel point-estimate equivalence | On a complete unweighted panel, use the cohort_time_fe preset, not-yet-treated controls, PT-all from the first date, and unrestricted post-treatment cohort-date effects. Match the untreated unit-and-date regression, optionally interacting baseline covariates with dates, and aggregate with the same weights. |
| Dube-Girardi-Jorda-Taylor: LP-DiD | Restricted long-difference equivalence | Match the unweighted clean-control long difference for a chosen baseline and horizon in the documented complete-panel, single-adoption-cohort design with never-treated controls. A pooled staggered comparison additionally requires identical risk sets and horizon weights. |
| Harmon: stepwise DiD | Consecutive-link construction | Estimate and sum consecutive two-date DiDs for one target cohort, using the cohorts still untreated at each step's endpoint. A standard chained fit can also use longer pairs and other supported control pools, so it need not give the same estimate. |
| DIDmultiplegtSTAT and did_multiplegt_stat | Matched binary static benchmark | Supply current binary treatment through dname and compare the documented switcher summaries on complete panels without covariates. The static model requires no carryover; this comparison does not cover dynamic treatment histories or the upstream packages' full treatment scope. |
| Balla-Elliott-Norwich: Cohort-Chained DiD | Matched cohort-regression equivalence | Use not-yet-treated controls, universal base period, cross_pair = TRUE, pt_assumption = 'ctrl', and gmm_weighting = 'within'. Recover the stacked cohort-fixed-effects point estimates when observation dates are common within each cohort and the regression sample and weights agree. |
Callaway-Sant'Anna: R did
did balances the full panel by default; allowing an unbalanced panel uses repeated-cross-section computations. Chained mode instead combines supported within-unit changes and offers separate observation adjustments.
Inference. Ordinary mode delegates inference to did. A chained comparison additionally requires matching the covariance and aggregation conventions; matching point estimates alone does not establish matching inference.
Commands, assumptions and evidence · Source · Source
Callaway-Sant'Anna: Stata csdid
csdid 2.0.3 defaults to bal(full); bal(pair) retains units observed at both comparison dates, and bal(none) uses repeated-cross-section computations. Pair balancing is the legacy 1.82 observation rule. Chaining can use additional supported pairs.
Inference. Match variance, clustering, bootstrap, confidence-band, and aggregation conventions separately. No universal R-Stata inference equivalence is asserted.
Commands, assumptions and evidence · Source · Source
Wooldridge: linear etwfe and jwdid
The documented match covers complete and incomplete panels on the same estimation rows. Use unit effects when observation dates vary within cohorts. Explicit observation correction is an additional cdid specification, outside the uncorrected regression match.
Inference. Matched cell effects and covariance require common effect-evaluation covariates, clustering, and sandwich normalization. Covariate-mean uncertainty and event-study aggregation weights must also be aligned; critical values are a separate choice.
Commands, assumptions and evidence · Source · Source · Source
Sun-Abraham: sunab and eventstudyinteract
The recorded benchmark is on complete panels. It does not establish a general incomplete-panel or selective-observation equivalence with either upstream command.
Inference. The stated benchmark concerns post-treatment cell point estimates. Event-study averages require the same cohort weights; covariance and inference are separate comparisons.
Commands, assumptions and evidence · Source · Source · Source
Gardner and Borusyak-Jaravel-Spiess
The recorded matches use complete panels. With incomplete outcomes, joint fixed-effects fitting and untreated-only imputation can use different information to estimate the untreated path. Actual-change imputation for selective observation is a separate operation.
Inference. The guide records post-treatment point-estimate matches to R did2s and didimputation. No general covariance or confidence-interval equivalence is claimed.
Commands, assumptions and evidence · Source · Source · Source · Source
Dube-Girardi-Jorda-Taylor: LP-DiD
The illustrated equivalence does not establish an incomplete-panel match. Other LP-DiD weighting and baseline options are outside this comparison.
Inference. The claim is a point-estimate match for the stated long difference. It does not certify the complete LP-DiD interface or all variance and inference options.
Commands, assumptions and evidence · Source · Source
Harmon: stepwise DiD
For an incomplete-panel comparison, match Harmon's target units eligible for the requested horizon and the observed controls in every step. Merely summing arbitrary pair-specific estimates does not establish the match.
Inference. The guide reproduces the point-estimate construction. Uncertainty for the sum must include covariance across steps because units can contribute to several comparisons.
Commands, assumptions and evidence · Source · Source
DIDmultiplegtSTAT and did_multiplegt_stat
The recorded upstream benchmark uses complete panels. cdid additionally supports chained static estimation with incomplete outcomes under its observation and identification restrictions.
Inference. Use the guide's exact switcher aggregation and reference commands. The benchmark does not establish universal covariance or inference equivalence across STAT options.
Commands, assumptions and evidence · Source · Source · Source
Balla-Elliott-Norwich: Cohort-Chained DiD
The matched cohort regression has common observation dates within cohorts. cdid's cross-pair implementation also supports within-individual changes with different observation dates and explicit selective-observation corrections under its stated assumptions.
Inference. The stated equivalence is for point estimates. Match sampling units, clusters, aggregation, and covariance conventions separately before comparing uncertainty.