This release substantially speeds up the 2x2 estimators and tightens the handling of ill-conditioned designs. Point estimates, standard errors, and influence functions are unchanged up to floating-point precision (~1e-14).

Performance

  • The propensity-score and outcome regressions now use fastglm’s low-level entry point (fastglmPure) in place of the fastglm() wrapper, skipping the per-call input-coercion and family/deviance bookkeeping that was paid on every fit. This is applied throughout: the point estimators, every weighted-bootstrap helper (which refits on each of nboot iterations), and the IPT/calibration propensity initializer.

  • The influence-function computations use crossprod() and BLAS dot products in place of colMeans(. * int.cov) and t(int.cov) %*% (W * int.cov).

  • Together these make the 2x2 estimators roughly 1.5x faster, with the weighted bootstrap benefiting proportionally.

Robustness

  • The propensity-score Hessian is now checked for singularity with rcond() before inversion, matching the long-standing check on the outcome-regression design. A near-singular propensity-score design previously yielded a silently incorrect standard error; it now stops with an informative message.

  • std_ipw_did_rc now warns when the propensity-score estimation does not converge and stops when the estimated coefficients are NA, matching the other propensity-score estimators (these guards were previously missing, so a rank-deficient design returned a corrupted standard error silently).

  • The repeated cross-section pre-processing now warns when collinear covariates are dropped, matching the panel pre-processing (previously the repeated cross-section path dropped them without notice).

Internal

  • Added a numeric regression-lock test suite that pins the ATT and standard error of every exported estimator, asserts the influence-function invariants, and checks that singular designs and negative weights are rejected.
  • Fix typo on non-stabilized IPW with trimming
  • Unify degree of freedom adjustments in analytical std errors # DRDID 1.2.2
  • Add trimming argument to avoid severe overlap problems. The default is to trim the propensity score in the comparison group that is above 0.995.
  • Fix typo on returning influence functions for TWFE regressions.
  • Improve code to avoid redundant data checks

  • Use fastglm instead of parglm for improved speed

  • Restore solve as default to invert matrix, as it is faster than qr.solve for small matrices.

  • Improve error handling for non-invertible matrices.

  • Changing estimation methods for fastglm and parglm (in place of lm and glm).

  • Do not let the estimated propensity score be above 1 - 1e-6 (instead of 1 - e-16).

  • Speed up data processing using Rcpp

  • The weights are now enforced to be normalized and have mean 1 across all observations.

  • Use qr.solve as default (instead of solve)

  • Drop collinear variables in pre_process_drdid.R (useful in drdid command but not other commands)

  • Add compatibility with R 3.5

  • Improve invertibility of outcome regression design matrix

  • Fixed links
  • Add new flags for non-unique unit identifier

  • Better handle of factor variables as covariates

  • Fix issue with NA in covariates
  • Allows for treating covariates as factor and alike when computing DiD

  • Improve error and warning handling due to collinearity and convergence issues.

  • First official version of package, functions for computing a variety of difference-in-differences (DiD) estimators for the ATT.

  • Documentation is improved compared to the devel version, including examples for every function now.

  • Created wrapper function drdid, ordid and ipwdid to implement doubly-robust, outcome regression and inverse probability weighted DID estimators.

  • Add dataset used in the empirical application of Sant’Anna and Zhao (2020).