Changelog
triplediff 0.1.0
CRAN release: 2025-07-23
- Initial release of triplediff in alpha stage, functions for computing group-time average treatment effects in DDD and combining them into a smaller number of parameters are available.
triplediff 0.1.1
- Bug fix in
clusterparameter. When user specifies a cluster variable, the function now correctly uses it for clustering standard errors performing Multiplier Bootstrap.
triplediff 0.2.0
CRAN release: 2026-01-16
- Replaced
parglmwithfastglmto avoid issues related to parglm’s scheduled archival on 2026-01-29. - Added support for unbalanced panel data and repeated cross-sectional data by properly implementing the
allow_unbalanced_panelparameter across all functions.
triplediff 0.2.1
- Add asymmetric propensity score trimming for control units with pscore >= 0.995.
- Add partition-specific collinearity detection with two-stage checking.
- Add comprehensive test suite including Monte Carlo coverage test when trimming.
triplediff 0.2.2
- Track BMisc (>= 1.4.9) API rename: replaced
makeBalancedPanelwithmake_balanced_panelandrhs.varswithrhs_varsin internal preprocessing. No user-visible behavior change. (#34) - Replaced the remaining deprecated
BMisc::getListElementcall withBMisc::get_list_elementto silence deprecation warnings (follow-up to #34).
triplediff 0.2.3
- Added analytical cluster-robust standard errors without the bootstrap in the multiple-period path. Calling
ddd()withcluster = <var>andboot = FALSEnow returns analytical cluster-robust standard errors (cluster-sum CRVE on the influence function) instead of requiring the bootstrap. Thedddobject now carriescluster_vectorandcluster_var. Two-period designs still requireboot = TRUEfor clustered inference. - Added a
clusterargument toagg_ddd(). Aggregated parameters (simple, event-study, group, and calendar) now report analytical cluster-robust standard errors. If clustering is requested on a different variable thanddd()used (or on an object built without clustering),agg_ddd()warns and falls back to i.i.d. standard errors instead of silently mis-reporting. - Behavior change: the clustered multiplier bootstrap now follows Callaway & Sant’Anna (2021, Remark 10), applying one multiplier per cluster to the influence function aggregated to cluster sums rather than cluster means. Clustered bootstrap standard errors change for unbalanced clusters and repeated cross-sections; equal-sized clusters are unaffected.
triplediff 0.2.4
CRAN release: 2026-06-13
- Resubmission. Simplified the
ddd()examples by removing the bootstrap-based clustered standard errors example, so the package examples stay within CRAN’s limit on the number of cores used during checks. No changes to package functionality.
triplediff 0.3.0
- Added the
gruber1994dataset with the Gruber (1994) maternity-mandate data. See?gruber1994. - Added
plot()methods fordddandagg_dddobjects that return aggplotobject (requires ggplot2). See?plot.dddand?plot.agg_ddd.
Bug fixes
-
agg_ddd()weights cohorts by P(S = g, Q = 1) in all aggregation types. Aggregates over more than one cohort change. See “Cohort weights” in?agg_ddd. - With
base_period = "universal", pre-treatment ATT(g,t) with t < g - 1 now use the covariates of period t in both nuisance models. - Fixed standard errors for GMM cells with
control_group = "notyettreated"in balanced panels. The point estimates of these cells and the aggregates that use them also move slightly. - Fixed the standard errors, confidence intervals, bootstrap draws and uniform bands of
ddd()withest_method = "dr"and covariates. This applies to repeated cross-sections (panel = FALSE) and unbalanced panels (allow_unbalanced_panel = TRUE). The influence function had the wrong sign for the estimation effect of the pre-period outcome regression of the comparison group. - Fixed the overall standard error of
agg_ddd(type = "group")when cohort effects differ. -
agg_ddd()now uses thealphastored in thedddobject, and the default isalpha = NULL. - Fixed
ddd()with unsorted or unbalanced two-period panels, which gave false errors or wrong estimates. It now drops units not observed in both periods with a warning. -
ddd()now stops when a unit has more than one row in the same period. -
ddd()now requirespnameto be coded 0 and 1, which fixesest_method = "ipw"returning NaN. - With two periods,
ddd()now requiresgname = Inffor never-treated units and stops on any other never-treated code, which fixes a flipped sign of the estimate. -
cluster = idnamenow works and equalscluster = NULL.cluster = c(idname, "x")now equalscluster = "x", andagg_ddd()then clusters onx. - With multiple periods,
ddd()now requires sampling weights to be the same in every period for each unit. - Fixed
ddd()withclusterfor multiple-period repeated cross-sections without an id (panel = FALSE,idname = NULL). - Fixed
ddd()without a never-treated group when some units are treated in the first period. It now drops only those units and keeps the last-treated cohort as the comparison group. -
ddd(cband = TRUE, boot = FALSE)now warns and setscband = FALSE, so lateragg_ddd()calls no longer stop. - With two periods,
panel = FALSEandidname = NULL,ddd()no longer adds a.row_idcolumn to adata.tablepassed asdataand now runs withskip_data_checks = TRUE.