R CMD check, with representative independent numerical and
inference references across the public interface. The extensive
development checks remain a separate required CI gate.tests/testthat/ and execute
the complete unfiltered installed test suite
(filter = NULL) as a mandatory gate across all four CI
platforms and via validation/run_full_tests.R.README.md to its
canonical https://www.davidbenatia.com/research/ address to
avoid HTTP redirects during CRAN incoming checks.Extend the augmented missing-outcome correction
(selection_est_method = "dr") to treatment IPW and OR,
alongside treatment DR. Each method fits only its active treatment
models and carries the complete observation, imputation and active
treatment-model uncertainty through inference. The two method choices
remain independent.
Extend bounded comparison and score reuse to augmented treatment IPW and both outcome-regression specifications, retaining each fitted model and all original-unit inference contributions.
Add outcome_pooling to chained att_gt()
and conditional_did_pretest(). The default,
"separate", fits the untreated outcome-change regression
separately for each distinct comparison. Identical comparisons reuse
their fitted regression. This changes the default working outcome model
for treatment OR and DR and can change estimates and inference. Set
outcome_pooling = "pooled" to retain the shared-slope
specification of version 1.1.0.1.
Apply the same outcome choice to observation-weighted, imputed
and augmented changes. selection_pooling continues to
control observation probabilities; imputation_pooling
continues to control actual-change imputation. Neither is changed by
outcome_pooling.
Carry comparison-specific regression uncertainty through the original-unit influence functions, aggregation and conditional pretrend test. Separate regressions retain prediction-preserving alias handling and report insufficient control support without switching to pooling.
Batch eligible complete and incomplete panel calculations for IPW, OR and DR, reusing fixed operators and sparse data reads while preserving comparison-specific coefficients and original-unit inference.
Reuse identical treatment propensity fits and their inference calculations across comparisons with the same fitting inputs, including imputed and augmented changes. Comparison-specific models and reported records are retained.
Reuse already computed original-unit influence-function rows between covariance and GMM calculations when workspace permits, and store observed-change and cohort inputs in bounded blocks for augmented estimation. Estimates, covariance and inference are unchanged by this reuse.
Account for workspace by fitting, covariance and reporting phase, retaining configured limits and releasing temporary inference buffers before later phases. Correct the final diagnostic memory check so released buffers contribute to the historical peak rather than current memory use.
Reduce repeated diagnostic counting for modeled missingness while retaining the same reported records and resource bounds.
Update native object, attribute and binding access for newer R releases while retaining version-specific code for older R versions.
Use registered native entry points bound to the owning library, and release temporary inference buffers through private mutable storage without unlocking R bindings.
Update help and the practical guide to explain the two outcome specifications. Historical article outputs retain their recorded versions and explicitly request the pooled specification where used.
Clarify direct GitHub installation, source-build tools and local R troubleshooting, with the current dependency requirements.
Construct internally estimated moment covariance matrices symmetrically, avoiding platform-dependent refusals caused by rounding in diagonal blocks.
Preserve the original coefficient bits, including signed zero, when binding optional numerical diagnostics.
Detect exactly duplicated and all-zero predictors before fitting treatment or observation logits, with a rank-deficiency diagnostic.
Refuse a full pretrend Wald test when its restriction count exceeds the exact centered covariance rank bound from the number of independent unit or cluster rows. Tiny positive Cholesky pivots from rounding cannot authorize an impossible full-rank test. Point estimates and their other inference remain available.
Avoid a rare refusal of a well-conditioned covariance when a host symmetric eigensolver loses orthogonality. One QR/Rayleigh refinement is accepted only under the existing reconstruction residual bound and is recorded in covariance diagnostics. Covariance inputs, definiteness checks and ridge settings are unchanged.
Faster computation through batching, exact reuse of shared nuisance and regression intermediates, and bounded phase-local influence-function (IF) storage across baseline and missing-outcome (selection, imputation, and augmented) routes, without claiming that every case improved.
Default probability safeguard using
did/DRDID-compatible values
(1e-6) with no trimming, no row exclusion, and no new
public tuning knob: treatment propensities have an upper cap of
1 - 1e-6 on the did/DRDID scale,
inverse-observation probabilities (and inverted positive empirical
pair-rate denominators) have a lower floor of 1e-6, and for
independent date logits
(selection_model = "independent_period_logit") the
1e-6 lower floor applies to the final pair
product.
Raw likelihood scores and information matrices remain evaluated at raw fitted probabilities, while weight derivatives in the influence functions respect inactive clipped regions (retaining derivatives where clipping is inactive and zeroing direct weight-derivative contributions where a cap or floor binds).
Route diagnostics report clipping activity and weight summaries, while genuine support and nuisance-estimation failures continue to be reported. Original-target and inference claims are qualified when clipping binds: clipping does not guarantee identification of the unclipped target, asymptotic robustness, or nominal coverage when active.
This version replaces cdid 0.1.1 with a new implementation built on
the did package. No code from 0.1.1 is included (see
inst/PROVENANCE.md). Scripts written for 0.1.1 should be
checked against the current help pages. Version 1.0.0.0 has not been
submitted to CRAN; install it from GitHub with
remotes::install_github("dvbn/cdid"). The optional pinned
setup described in validation/SETUP.md installs exactly the
tested versions of did and DRDID.
att_gt() and aggte() keep the upstream
argument order of did 2.5.1. att_gt() adds
mode and chained-specific arguments. Its
allow_unbalanced_panel = NULL default permits incomplete
histories in chained mode and becomes did’s FALSE in
ordinary mode; explicitly setting it to FALSE is refused in
chained mode. Other upstream defaults are retained. aggte()
dispatches on the result class without a mode argument.
ggdid(), tidy() and glance() are
re-exported from did, with methods for chained results.mode = "ordinary" passes the call unchanged to did. It
is also the default for repeated cross sections. An explicit
allow_unbalanced_panel = NULL is translated to did’s
FALSE.frame supplies the unit table of the study population,
including units with one or no observed outcome.est_method = "dr", the default), chained outcome
regression ("reg") and chained IPW ("ipw"). OR
and DR fit one pooled regression of the controls’ outcome changes with
local block intercepts. Custom did-style IPW callbacks are accepted and
may return the optional log_weight_gradient.selection = "conditional_mtar"
(legacy alias "corollary1") corrects for missingness that
depends on covariates. selection_est_method chooses
observation weighting ("ipw", default), change imputation
("imputation") or the augmented correction
("dr", with est_method = "dr" only). Related
arguments: selection_model ("pair_logit" or
"independent_period_logit"),
selection_pooling, imputation_pooling,
selection_xformla, selection_universe,
selection_rho and
selection_justification.pt_assumption = "post" (default) or
"all" with an explicit common pt_start.gmm_weighting = "optimal" (alias
"two_step", default) or "identity", with
Tikhonov handling of a singular or near-singular moment covariance
(gmm_covariance = "tikhonov").fix_weights accepts NULL,
"first_period" and "base_period"; covariates
and sampling weights that change within a unit are supported with an
explicit reference date.conditional_did_pretest() runs a chained conditional
pretrend test for panels by default and delegates to did in ordinary
mode.MP and AGGTEobj fields,
with complete influence functions, analytic or multiplier inference,
clustering on at most one variable beyond idname, and a
chained record of support, models and settings.
aggte() aggregates chained results without refitting.print() and summary() of chained results
show did’s table under a heading naming the chained estimator, followed
by a short chained record: available cells and the reasons for
unavailable ones, the unit table, the correction for missing outcomes,
parallel trends, GMM weighting and regularization, the inference
performed and the pretrend test. Aggregates also list restricted or
unavailable targets and the bins excluded from the overall summary. Each
paper reference is shown once in the heading; detailed technical records
stay in the result.compute_inffunc = FALSE, print_details,
and pl/cores (with workers declared in
control$workers) follow did’s meaning. control
sets numeric workspace, workers, chunk rows, an optional estimated-work
cap and the covariance regularization constants.