EDI (development version)
Breaking changes
InferenceSurvivalDepCensTransformRegrno longer offers the Bayesian bootstrap.compute_bayesian_bootstrap_two_sided_pval(),compute_bayesian_bootstrap_confidence_interval()andcompute_estimate_with_bootstrap_weights()now returnNAwith anedi_unsupported_procedurewarning, as its jackknife and randomization methods already did. Each weighted draw had been a weighted Cox fit, whose treatment coefficient is a log hazard ratio under independent censoring, not the class’s log time ratio under dependent censoring, so the draws were centred on a different quantity (v1.0.6-TODO-326). Use the nonparametric bootstrap (compute_bootstrap_confidence_interval()) instead.DesignFixedRerandomization$new()now requires an acceptance rule, exactly one ofobj_val_cutoffandprop_acceptable, and stops if neither is given. Before, giving neither accepted every candidate draw, so the design was complete randomization with a fixed number treated: no rerandomization at all. Pass e.g.prop_acceptable = 0.1(keep the best 10% of draws by Mahalanobis distance);obj_val_cutoff = Infreproduces the old behaviour exactly.SimulationFrameworksuppliesprop_acceptable = 0.1when the design is given without a rule.DesignSeqOneByOneiBCRDnow requiresnand errors onn = NULL. Its oldn = NULLfallback assigned by Bernoulli coin while its randomization draws forced exact balance, so its randomization tests were invalid. UseDesignSeqOneByOneBernoulliwhen the sample size is unknown. Designs constructed withnare unchanged (v1.0.6-TODO-187).-
Argument checks are stricter. Calls that used to be accepted and gave
NA, a silently wrong value or a confusing later error now stop with a checkmate error naming the argument (v1.0.6-TODO-100, v1.0.6-TODO-106):-
alphamust be a single number strictly between 0 and 1. The old upper bound1 - .Machine$double.xminequals 1 in double precision, soalpha = 1passed and gave a zero-width interval. -
alpha,delta,pval_epsilon,tau,prob_Tand similar scalar arguments must have length 1 (a vector used to be silently truncated or recycled), must not beNA, anddeltamust be finite (delta = Infused to give p = 0). -
Design$new(n = 0)is rejected, and count arguments such asB,max_expansionsandmc_batch_sizemust be whole numbers (2.7 was silently truncated to 2). - Responses:
add_one_subject_response(y = NA)andNAresponses inadd_all_subject_responses()are rejected for non-survival designs with a message naming the first such subject, and an exact response must be finite (right censoring is stilly_Lwithy_R = Inf). -
strata_cols,cluster_col,classes/exclude_classesand logical flags such asna.rm,show_progress,exact_num_blocksandequal_block_sizesmust not containNA. - An
InferenceRandCustomR statistic must accept(y, w, dead)(or...); it used to fail only at the first draw. - The checks that guard correctness (an
NAresponse,prob_T, Pocock-Simonp_best/weights, and the 0/1wpassed tooverwrite_all_subject_assignments()) now run even with assertions turned off for speed.
-
-
More calls that used to return a wrong or meaningless result now stop with a clear error:
-
DesignSeqOneByOneKK14,DesignSeqOneByOneKK21andDesignSeqOneByOneKK21stepwiserejectlambdaort_0_pctoutside [0, 1] (orNA) at$new(). They used to construct and then fail partway through the trial, or never match (v1.0.6-TODO-290). -
assign_w_to_all_subjects(w_precomputed = )on fixed designs checks the vector: numeric or logical, length n, noNA, only 0 and 1, both arms, and on cluster designs the same value within every cluster. A 1/2-coded vector used to be stored and giveNAestimates silently (v1.0.6-TODO-300, v1.0.6-TODO-301). -
DesignFixedRerandomizationrejects anobjectiveother than"mahal_dist"or"abs_sum_diff"at construction; an unknown value silently ran asabs_sum_diffon the fast path (v1.0.6-TODO-70). -
DesignSeqOneByOneEfronrequires0.5 < weighted_coin_prob <= 1(1 is Efron’s deterministic limit); values above 1 gaveNAassignments (v1.0.6-TODO-70). -
InferenceIncidGCompRiskDiff,InferenceIncidGCompRiskRatioandInferencePropGCompMeanDiffrejectprob_clip_eps = 0.5(andprob_clip_strong_eps = 0.5), as documented: the clamps must be in[0, 0.5). At 0.5 every fitted probability was clipped to 0.5. -
overwrite_all_subject_assignments()now has one implementation for fixed and sequential designs and stops if called before any subjects are added or, for a sequential design withn, before allnsubjects have arrived (an overwrite mid-trial fed later sequential assignments awthe design never drew) (v1.0.6-TODO-154). -
compute_lik_ratio_bootstrap_confidence_interval()errors up front whenB < 2/alpha - 1(e.g. “B must be at least 39 for alpha = 0.05”): its bootstrap p-value can never be below 2/(B+1). Such calls used to run the whole search and return a warnedNA;InferenceCountPoissonsilently fell back to its design-based interval.InferenceSuite$run_all_inference()makes the same check before any fitting when the"param_boot"CI is in the run, and asks for a largerB. The defaultB = 199covers anyalpha >= 0.01(v1.0.6-TODO-210). A userBbelow 5 now errors before fitting when a bootstrap method runs in the suite (v1.0.6-TODO-219). - The smoothed bootstrap randomization test and interval (
type = "smoothed") refuse left- or interval-censored survival data. The noise was added only to exact times, never to censored subjects’ bounds, and its bandwidth came from the exact times alone. Usetype = "percentile"(v1.0.6-TODO-146). - The Bayesian bootstrap (interval, p-value and draw distribution) refuses left- or interval-censored data for
InferenceSurvivalKMDiff,InferenceSurvivalRestrictedMeanDiff,InferenceSurvivalGehanWilcox,InferenceSurvivalLogRankandInferenceSurvivalWeibullRegr, whose interval-censored fits take no case weights. It used to returnNAwith a misleading reason (or, for the RMST and KM-difference p-values, a silentNA). Right-censored data are unaffected (v1.0.6-TODO-141, v1.0.6-TODO-90). -
compute_rand_bootstrap_two_sided_pval()refuses a nonzerodeltaon incidence responses, ascompute_rand_two_sided_pval()already did; it used to shift the 0/1 responses and return a meaningless p-value (v1.0.6-TODO-151). - Randomization and randomization-bootstrap confidence intervals are refused under any marginal estimand (error class
edi_rand_ci_estimand_scale_mismatch_refused), because they invert a logit or log shift whose bounds are not on the estimand’s scale;$capabilities()no longer lists them there (v1.0.6-TODO-184, v1.0.6-TODO-189).
-
These classes no longer offer the Bayesian bootstrap and refuse it:
InferenceBaiAdjustedTKK14,InferenceBaiAdjustedTKK21,InferenceContinKKRobustRegrIVWC,InferenceSurvivalGLMMWeibullFrailtyNormalIVWC,InferenceSurvivalGLMMWeibullFrailtyLoggammaOneLikandInferenceSurvivalGLMMWeibullFrailtyLoggammaIVWC. Their replicates did not refit the class’s estimator (the Loggamma IVWC replicates, for example, came from a marginal Weibull fit, not its Clayton-copula inverse-variance-weighted estimator) (v1.0.6-TODO-217, v1.0.6-TODO-235).The cumulative-link ordinal fitters (
fast_ordinal_regression*_cpp,fast_ordinal_{probit,cauchit,cloglog}_regression*_cpp) no longer return afisher_informationfield: it held the observed Hessian, not the expected information. Useobserved_information/information(v1.0.6-TODO-215).Saved
tune_EDI_for_this_machine()policies from earlier versions are ignored (tuning schema version 2), because their continuous, proportion and survival timings were measured on synthetic fixtures whose covariates were dropped as perfect predictors; run the tuner again (v1.0.6-TODO-212).
Changes that alter results
Designs
DesignSeqOneByOneKK14now forms matches at the published rate. Its match test compared the full d’S^-1 d with the Hotelling cutoff, but the statistic is half of that (the difference of two exchangeable subjects has covariance 2 Sigma), as SeqExpMatch computed it. The halving was lost in the C++ port, so KK14 was twice as strict as published and sent too many subjects to the reservoir. With 4 covariates, the mean number of pairs at n = 40 goes from 8.5 to 14.0 of 20, and at n = 100 from 31.5 to 42.0 of 50, close to KK21. Seeded KK14 allocations change, and so does everything computed from them, including KK21 and KK21stepwise before they have enough responses to leave their KK14 fallback. To reproduce an old allocation approximately, passlambda = 0.1 * 2^(-p/2)for p covariates (v1.0.6-TODO-45).Sequential designs (
DesignSeqOneByOne*) with a non-NULLseednow draw each subject’s assignment from a seed derived from (seed, subject index) and restore the session’s random-number state afterwards. Allocations depend only on the seed and the subjects’ data; random numbers used between assignments no longer change them; a trial saved withsaveRDS()continues exactly afterreadRDS()without saving.Random.seed; and constructing or assigning no longer resets the session’s stream.draw_ws_according_to_design()on a seeded sequential design is seeded too, so repeated calls return the same draws, as on fixed designs. Seeded sequential allocations differ from earlier versions;seed = NULLis unchanged, and there an exact continuation after a restart needs the saved.Random.seed. The reproducibility vignette and theDesigndocumentation state what a design’sseedguarantees (v1.0.6-TODO-177, v1.0.6-TODO-79).Treated counts at a .5 tie now agree everywhere.
DesignFixediBCRDsets the treated count with R’sround(n * prob_T)(a .5 tie goes to even), matchingDesignSeqOneByOneiBCRD: n = 21 atprob_T = 0.5now treats 10, not 11.DesignFixedRerandomizationwithprop_acceptableatprob_T = 0.5and odd n now treatsround(n / 2), as its other paths and its documentation do: n = 23 now treats 12, not 11.DesignSeqOneByOneiBCRD’s randomization redraws had one more treated subject than the realized trial in the tie case, because the two rounded differently; redraws now use the realized treated count, so randomization p-values and CIs use the correct null. Realized allocations and randomization redraws change only in these tie cases (v1.0.6-TODO-234, v1.0.6-TODO-213).-
DesignFixedRerandomizationwithobjective = "abs_sum_diff":- Each covariate is standardized by its SD on every path. The C++ paths always did, but the pure-R path (odd n, or
prob_Tother than 0.5) used raw differences, so the sameobj_val_cutoffaccepted different allocations depending on n. Draws change only forabs_sum_diffat odd n or unequal arms (v1.0.6-TODO-70). - With
prop_acceptable, draws are now filtered when the model matrix has a constant column, e.g. from adesign_formulaterm such asI(x^0). The objective divided that column by its zero SD, so every draw scoredNaNand the design kept the first draws unfiltered (complete randomization). A zero-variance column is now left unscaled and adds nothing, as on theobj_val_cutoffpaths. The default~ .formula drops constant columns, so it was not affected. Otherabs_sum_diffvalues can differ in the last digits, since the SD is now computed from centered sums (v1.0.6-TODO-276). - The default
mahal_distis unchanged.
- Each covariate is standardized by its SD on every path. The C++ paths always did, but the pure-R path (odd n, or
DesignSeqOneByOneKK21andDesignSeqOneByOneKK21stepwisewithproportion_use_speedup = TRUE(the default): when any proportion response observed so far is exactly 0 or 1, every response is now compressed to (y(n - 1) + 0.5)/n before the logit (Smithson and Verkuilen 2006), with n the number of responses in the weight regression. KK21 used to lose all covariate weights in that case (silently matching unweighted), and the stepwise design’s clamp to machine epsilon made a 0 or 1 a +/-36 logit outlier in the matching-weight t-statistics. Allocations change for designs with 0/1 responses and are unchanged when all responses are strictly between 0 and 1 (v1.0.6-TODO-60).DesignFixedOptimalwithobjective = "mahal_dist"no longer silently falls back to theabs_sum_diffobjective when full-rank covariates are on very different scales; the singularity check now uses the correlation matrix, so it is scale-invariant (v1.0.6-TODO-54).DesignFixedGreedyDOptimalandDesignFixedOptimal(objective"D"/"A", noprior_precision) now build the correct criterion when a covariate is collinear with the intercept (e.g.x2 = x1 + 1, or indicators that sum to 1). The projection matrix used to include an arbitrary extra direction, and the A-criterion’s interest columns could be misaligned after QR pivoting, so the search optimized the wrong objective. Designs where[1, X]has full rank are unchanged (v1.0.6-TODO-57).draw_ws_according_to_design()on a sequential design that uses the generic replay (DesignSeqOneByOneUrnand custom sequential designs) no longer overwrites the subjects’ realized assignments. A redraw, including the one insideInferenceIncidCMH’s standard error, used to leave a redrawn vector inget_w(), changing every later inference and the rest of a running trial (v1.0.6-TODO-42).missingness_method = "impute"no longer uses the outcome to impute missing covariates. missRanger/missForest were given the response as a predictor. Treated subjects’ responses are shifted, so the imputed covariate carried part of the treatment effect, and adjusting for it biased the estimate toward 0 (in one simulation, a true effect of 1 was estimated as 0.90 with 91% CI coverage; now 1.00 and 93%). Imputation now uses the covariates only, and it is seeded (with the design’sseed, else 1) without advancing the caller’s RNG, so the same data always give the same estimate. Imputed values and covariate-adjusted estimates change for data with missing covariates. Randomization tests under the sharp null were not affected (v1.0.6-TODO-44).
Randomization tests
Every Monte Carlo randomization p-value now counts the observed allocation as one of the draws, the exact rule of Phipson and Smyth (2010). With
Bfinite reference draws, each tail is(1 + b) / (1 + B), wherebcounts the draws at least as extreme in that tail. The default two-sided p-value doubles the smaller tail,min(1, 2 * (1 + min(b_ge, b_le)) / (1 + B)); thealternative = "greater"/"less"p-values use the single tail; and the p-values built from an absolute statistic (the"symmetric-percentile-t"randomization-bootstrap type and the KK quantile-regression sign-flip and permutation components behind its Zhang-combined interval) are(1 + #{|T_m| >= |T_obs|}) / (1 + B). This coverscompute_rand_two_sided_pval(),InferenceRandCustom,compute_rand_bootstrap_two_sided_pval()(everytype) and the confidence intervals that invert them. Before, the rule wasb / Bwith a floor of2 / B(1 / Bone-sided), which atr = 201andalpha = 0.05rejected a true null 5.94% of the time; the new rule’s size is at mostalpha(4.95% there). Randomization p-values rise by about1 / (B + 1)to2 / (B + 1), the smallest two-sided p-value is2 / (B + 1)(one-sided and absolute-statistic:1 / (B + 1)), no randomization p-value is ever 0 (the KK quantile components could return 0 before, which the Zhang combination then treated as missing), and inverted randomization confidence intervals widen slightly. Thecompute_rand_bootstrap_confidence_interval()message for a too-smallBnow fires when2 / (B + 1) >= alpha(v1.2.0-TODO-207).The realized allocation is never also one of the randomization reference draws, so the rule above counts it exactly once (v1.2.0-TODO-263). A fixed design with a
seed, analysed without an inference seed (or with the same value), drew its reference allocations from that seed, and the first one was the realized allocation again (iBCRD, Bernoulli, cluster, binary-match, greedy, greedy D-optimal and greedy pair-switching designs); that draw is now skipped and the draws start with the next one. Seeded p-values and intervals for those designs change, and the test is exact again: atr = 201its null size was 0% atalpha = 0.01and 4.2% at 0.05, and is now about 1% and 5%. A full enumeration passed aspermutations(enumeration = TRUE, or recognised automatically as the whole complete-randomization support) has its copy of the realized allocation removed, so the p-value is the exact enumeration p-valueb / N. Random redraws that equal the realized allocation by chance are kept.Randomization p-values (
compute_rand_two_sided_pval(), their Monte Carlo bands, the studentized randomization-bootstrap p-values and the closed-form randomization-bootstrap CI) now count a redrawn statistic as a tie in both tails when it is withinsqrt(.Machine$double.eps)times max(|observed|, largest |redraw|) of the observed one. A redraw that reproduces the observed allocation gives the observed statistic only up to rounding, so whether it counted could depend on the build, core count and subject order. Before, the tolerance was 1e-8 times |observed|, so an observed statistic of exactly 0 never caught ties at about 1e-17: an enumerated 12-subjectInferenceOrdinalRidittest, with half its exact ties at -5.6e-17, gave a two-sided p of 0.9935 instead of 1 and a one-sided p of 0.497 instead of 0.634. P-values with such ties can only rise.Randomization distributions no longer chain warm starts between permutations: every permutation’s fit starts from the full-data fit. Chaining made seeded results depend on
set_num_cores(), and for classes whose likelihood is not concave (registrylikelihood_concave = FALSE) one replicate that landed on a wrong local optimum seeded the following ones. Seedednum_cores = 1randomization p-values and intervals change, at the optimizer-tolerance level for concave likelihoods (v1.0.6-TODO-61).Under
set_estimand("marginal_mean_diff")/"marginal_ratio", the randomization and bootstrap-randomization tests ofInferencePropBetaRegr,InferencePropZeroOneInflatedBetaRegr,InferenceCountPoisson,InferenceCountQuasiPoisson,InferenceCountHurdlePoisson,InferenceCountZeroInflatedPoissonandInferenceIncidLogRegrnow use the marginal statistic. Before, the observed statistic was the conditional coefficient while the null draws could be marginal, so p-values were wrong. Switching estimands withset_estimand()now discards cached resampling distributions and workers from the previous estimand, for every class with a marginal estimand (v1.0.6-TODO-189, v1.0.6-TODO-184).InferenceRandCustomat a nonzerodeltanow tests a coherent sharp null on survival, count and proportion responses, and withtransform_responses = "log"or"logit". Each draw used to re-adddeltaadditively although it had been removed on the log (survival, count) or logit (proportion) scale, so the reference distribution matched no null (proportion draws could leave [0, 1]). The draws now re-applydeltaon the same scale, exactly as the built-in classes do. The survival randomization CI now evaluates the statistic on the raw times and inverts the class’s own p-value, so it is an interval for the log time ratio (it used to pass log times to the statistic). Continuous responses under the default are unchanged (v1.0.6-TODO-286).compute_rand_two_sided_pval()now returnsNAwhen fewer thanmax(10, floor(r/10))randomization draws are finite on the cached affine-reuse path too (it required only one), matching the uncached path and the documentation (v1.0.6-TODO-124).-
The bootstrap randomization test (
approximate_rand_bootstrap_distribution_beta_hat_T(),compute_rand_bootstrap_two_sided_pval(),compute_rand_bootstrap_confidence_interval()):- With a nonzero
deltaon left- or interval-censored survival data it now shifts the censoring boundsy_L/y_Ralong with the exact times. Before, the null distribution ignoreddeltafor censored subjects (entirely, when every subject was censored), so its p-values and intervals on such data were wrong (v1.0.6-TODO-143). -
InferencePropGCompMeanDiffbuilt its null distribution from ordinary bootstrap refits on the observed assignment, so it was centred at the estimate and its p-values were near 1 even for strong effects. It now refits each fresh design assignment under the sharp null (v1.0.6-TODO-150). -
InferencePropZeroOneInflatedBetaRegrnow builds its null from the fresh design draw. Its reused-worker fast path had fitted the observed treatment column against the sharp-null responses, so the null draws were centred at the estimate (p about 0.85 where the randomization test gave 0.01). Plain bootstrap results do not change (v1.0.6-TODO-167). - The studentized and symmetric-percentile-t p-values of
InferenceIncidGCompRiskRatioandInferenceIncidKKGCompRiskRationow center at the no-effect risk ratio 1. They centered at 0, so under a true null the test almost never rejected (rejection rate 0.000 at 0.05, now 0.055) (v1.0.6-TODO-151). - Reusable bootstrap workers now redraw assignments on the design’s own
design_formulamatrix when the inference uses a differentmodel_formula; covariate-aware designs (greedy, rerandomization, Atkinson, KK21stepwise) used to balance on the inference’s columns. On rank-deficient draws the worker also keeps the inference’smodel_formulacolumns instead of falling back to the design’s (v1.0.6-TODO-130). - With
DesignSeqOneByOneAtkinson, or withDesignSeqOneByOneKK21stepwise(condition_on_ws_for_rand_tests = FALSE), a bootstrap resample that leaves a covariate constant no longer makes the test fail (Atkinson) or ignore the covariates (KK21stepwise): the redraw now rebuilds the design’s model matrix first (v1.0.6-TODO-129).
- With a nonzero
Bootstrap, jackknife and other resampling
Bootstrap, Bayesian-bootstrap and randomization-bootstrap p-values computed with
na.rm = TRUEnow returnNA(reason*_too_few_valid_replicates_fraction, with oneedi_procedure_na_warning) when fewer than 95% of the replicates are valid, instead of a p-value from the surviving replicates. The new argumentmin_fraction_usable_samples(default 0.95;0turns the check off) sets the minimum. This also changes default calls wherena.rm = TRUEis the default:compute_rand_bootstrap_two_sided_pval(), the KM-difference Bayesian bootstrap and the zero-augmented count classes, and the internal bootstrap fallbacks of the log-rank, Gehan-Wilcoxon, RMST, KK conditional Poisson and ordinal g-computation classes. With sequential Monte Carlo early stopping,compute_rand_bootstrap_two_sided_pval()no longer stops on a prefix below the cap, and returnsNAwith reasonrand_bootstrap_too_few_valid_replicates_fractionwhen all B draws fall below it.na.rm = FALSEand the bootstrap confidence intervals are unchanged (v1.0.6-TODO-12, v1.0.6-TODO-219).-
Subsampling and m-out-of-n for ratio estimands (
InferenceIncidGCompRiskRatio,InferenceIncidKKGCompRiskRatio,InferenceIncidLogRegr,InferenceIncidKKGEE,InferenceIncidModifiedPoisson,InferenceIncidLogBinomial,InferenceCountPoisson):- Degenerate draws are dropped: a treatment arm with no events (logit scale: or only events; counts: a zero total), or a non-converged or separated logistic fit. They are
NaNin the subsampling and m-out-of-n distributions, including withdebug = TRUEinapproximate_subsampling_distribution_beta_hat_T()and its m-out-of-n equivalent, which also reportnum_degenerate. Kept, these draws gave log risk ratios near +/-20 and made the g-computation tests almost never reject (null size 0.005 and 0.000 at n = 80) (v1.0.6-TODO-191, v1.0.6-TODO-230). - When fewer than
min_fraction_usable_samplesof the draws are usable, the p-value or interval isNAwith reasonsubsampling_too_few_usable_draws_fractionorm_out_of_n_too_few_usable_draws_fractionand oneedi_procedure_na_warning. The new argument defaults to 0.8; the generic subsampling and m-out-of-n p-value and CI methods take it and other classes ignore it. Degenerate draws pile up in datasets with an extreme log RR-hat, so at 0.95, 9% (subsampling) and 29% (m-out-of-n) of small null datasets returnedNA, including most of those where the Wald test rejects. At 0.8 none did, and null size was 0.040 / 0.030. Intervals that used to beNAfrom the extreme-interval cap (up to 54% of small null datasets) are now finite. For the risk ratio the ordinary bootstrap remains the recommended resampling method (v1.0.6-TODO-230, v1.0.6-TODO-269). - P-values are now symmetric: the share of pivot draws with |T*| >= |t|, not twice the smaller tail. At small subsample sizes the log-ratio draws are skewed toward the observed effect, and the equal-tailed rule doubled that tail, so these tests rarely rejected. Null size at n = 80 rose from 0.040 to 0.055 (g-computation RR subsampling) and from 0.015 to 0.045 (KK). Confidence intervals are unchanged (equal-tailed) (v1.0.6-TODO-230).
- Degenerate draws are dropped: a treatment arm with no events (logit scale: or only events; counts: a zero total), or a non-converged or separated logistic fit. They are
-
The jackknife on blocked designs deletes smaller units and pools within strata (the stratified jackknife, Wolter 2007, Sec. 4.5). It used to delete whole strata, which left 2-4 replicates, jackknife-Wald coverage of about 0.84, or an
NAjackknife:-
DesignSeqOneByOneSPBRandDesignSeqOneByOneRandomBlockSizedelete one permuted block at a time (blocks are recorded at assignment; a trailing partial block is merged into the previous one). When any stratum holds fewer than 10 permuted blocks, the automatic unit is instead one subject within its stratum ("observation_within_block"): with 2-9 blocks in the smallest stratum the permuted-block jackknife-Wald test was too liberal (InferenceCountPoisson, prob_T 0.2, n = 200,~ 1: size about 0.06 on both designs at a nominal 0.05, against 0.050-0.055 deleting single subjects).unit = "permuted_block"still deletes permuted blocks. -
DesignFixedBlockingdeletes one subject at a time within its stratum. -
ObservationalDesignBlockswith fewer than 5 blocks jackknifes one subject at a time within blocks (treated as strata) instead of leaving out whole blocks, which gaveNA. - BCa bootstrap intervals and p-values on these designs take their acceleration from the within-stratum jackknife influence values.
Jackknife SEs, p-values, CIs and BCa intervals change on these designs, for every class; coverage at beta = 0 is now about 0.92-0.97. Other designs are unchanged (v1.0.6-TODO-4, v1.0.6-TODO-231, v1.0.6-TODO-270).
-
Jackknife-Wald tests and intervals on the stratified deletion units (
"permuted_block","observation_within_block": SPBR, RandomBlockSize, FixedBlocking and few-blockObservationalDesignBlocks), including the g-computation risk-ratio log-scale jackknife, use the t distribution with sum_h(n_h - 1) degrees of freedom instead of the normal. SPBR incidence coverage at beta 0 rises from about 0.93 to 0.95. Unstratified units are unchanged (v1.0.6-TODO-231).With fewer than 5 deletion units (for example leave-one-block-out with 2 to 4 blocks or clusters), the jackknife estimate, bias, standard error, Wald p-value and Wald interval are now
NAwith anedi_procedure_na_warning(reasonjackknife_too_few_deletion_units), and so are BCa bootstrap intervals and p-values (type = "bca", plain and Bayesian; reasonbootstrap_bca_jackknife_too_few_deletion_units/bayesian_bootstrap_bca_jackknife_too_few_deletion_units), whose acceleration comes from that jackknife. With G units the jackknife variance has G - 1 degrees of freedom, and the normal-reference Wald interval covers only 70% to 86% at G = 2 to 4; 2 blocks gave a finite BCa interval with an acceleration of exactly 0. Results with 5 or more units are unchanged (v1.0.6-TODO-135).The default BCa bootstrap p-value (
compute_bootstrap_two_sided_pval()andcompute_bayesian_bootstrap_two_sided_pval(),type = "bca") now returns the 2/B floor instead ofNAwhen the null value lies outside the bootstrap distribution, matching the percentile, symmetric and studentized types (v1.0.6-TODO-75, v1.0.6-TODO-114). When the BCa adjustment is on the boundary the p-value is stillNAbut now warnsedi_bootstrap_bca_boundary_warning, like the BCa interval, and at B >= 501 that warning no longer recommends increasing B (v1.0.6-TODO-92).-
The bootstrap and Bayesian-bootstrap “extreme interval” check:
- no longer rejects wide intervals for log-ratio and link-scale estimands (log odds, rate, risk, hazard and time ratios; probit, cloglog, cauchit and stereotype effects) just because they are wider than 5 outcome SDs. Such an interval is now kept when it is at most 10 robust SDs (MAD) of the bootstrap replicates wide and both bounds are within +/-10 on the link scale. Example:
InferenceOrdinalPropOddsRegron a 10-cluster design now returns its bootstrap interval instead ofNA(v1.0.6-TODO-157); - always rejects a log-ratio or link-scale interval with a bound beyond +/-10 (a ratio of about 22,000), whatever the outcome’s SD; large-SD counts used to let degenerate log-rate-ratio intervals such as [-25.8, -5.0] through (v1.0.6-TODO-160);
- on left- or interval-censored survival data (RMST, the KM median difference, and the asymptotic intervals that fall back to the bootstrap) no longer rejects intervals as “extreme” and returns
NA: it now measures the outcome’s spread from the exact times, interval midpoints and censoring times instead of the all-NAexact response (v1.0.6-TODO-91).
Separation-driven intervals are still rejected, and intervals that were accepted before are unchanged.
- no longer rejects wide intervals for log-ratio and link-scale estimands (log odds, rate, risk, hazard and time ratios; probit, cloglog, cauchit and stereotype effects) just because they are wider than 5 outcome SDs. Such an interval is now kept when it is at most 10 robust SDs (MAD) of the bootstrap replicates wide and both bounds are within +/-10 on the link scale. Example:
For
InferenceIncidGCompRiskRatioandInferenceIncidKKGCompRiskRatio, the stability checks now judge the risk ratio on log(RR) everywhere. Skewed but legitimate intervals such as [0.76, 6.5] are kept and degenerate ones reaching about 1e-10 are rejected; a few replicates with near-zero control risk no longer make the percentile/BCa intervalNA; subsampling and m-out-of-n intervals reaching a ratio beyond e^10 (e.g. [3e-5, 2.8]) are nowNAwith a warning; and the basic bootstrap and basic/Wald Bayesian-bootstrap intervals now run the extreme-interval check, so degenerate intervals such as [1.4e-8, 20] are no longer returned silently (v1.0.6-TODO-160, v1.0.6-TODO-175). Their jackknife-Wald p-value and interval now use the shared jackknife guards: fewer than 5 deletion units, failed or zero leave-one-unit-out risk ratios, and extreme replicates giveNAwith anedi_procedure_na_warningnaming the reason, where before the result was a finite value (with 3 units, or intervals from 1e-13 to 1e14) or a silentNA. Results with 5 or more units and no failure are unchanged (v1.0.6-TODO-137).-
Bootstrap and jackknife replicates on rank-deficient resamples (for example leave-one-block-out with the strata column in
design_formula) now equal a refit on the resampled rows:- About 30 regression classes (logistic, probit, modified Poisson, risk difference, quasi-Poisson, beta, the ordinal regressions, Weibull, stratified Cox, and the KK OLS, robust, GLMM, hurdle and conditional classes) no longer fail or silently drop the covariates; several silently fitted the unadjusted model on such draws (v1.0.6-TODO-123).
- BCa bootstrap and jackknife intervals on
DesignFixedBlockingwith adesign_formulathat names the strata column are no longerNA: the model matrix is rebuilt correctly when a resample leaves a formula column constant.InferenceContinLinalso rebuilt its covariates incorrectly on rank-deficient resamples (v1.0.6-TODO-108, v1.0.6-TODO-107). - Zero-inflated and hurdle Poisson/negative-binomial classes are no longer
NAon a resample that makes a covariate constant, and the non-reusable-worker bootstrap refit no longer reuses the full-data covariate matrices, which R silently recycled against the resampled rows whenevermodel_formulais not~ .(v1.0.6-TODO-126). -
InferencePropBetaRegrwas passed a warm start sized for the full design; the reduced fit failed, and the column-dropping fallback then dropped a real covariate as well, which moved the replicate (by about 1e-3 on the logit scale in the test case). Full-data estimates are unchanged.
The bootstrap and randomization-bootstrap refits that copy the inference object for each draw (used when the reusable worker is off) now take the draw’s rows of the design’s
y_L,y_Randy_original, and clear every other private cache still holding the parent’s rows. Randomization-bootstrap null draws on interval-censored data were allNAfor the Weibull and log-rank classes and wrong for the KM median difference (v1.0.6-TODO-131).-
Studentized (bootstrap-t) intervals and p-values for the g-computation classes are no longer
NA:-
InferencePropGCompMeanDiff,InferenceIncidGCompRiskDiffandInferenceIncidGCompRiskRatio: the nonparametric and Bayesian bootstrap wereNAon every design (no standard error was exposed to the bootstrap, and weighted refits returned none); they now use the Wald standard error and a weighted HC0 delta-method standard error. Their studentized randomization-bootstrap p-values used to fall back to the percentile method without saying so (v1.0.6-TODO-134). -
InferenceOrdinalGCompMeanDiff,InferenceIncidKKGCompRiskDiffandInferenceIncidKKGCompRiskRatio: weighted refits now supply a weighted delta-method standard error (weighted inverse information for the ordinal model, a weighted matched-pair cluster sandwich for KK), equal to the usual standard error at unit weights. The KK classes’ studentized nonparametric bootstrap and studentized bootstrap randomization test now also use the real standard error (v1.0.6-TODO-149).
-
InferencePropGCompMeanDiff: the leave-one-block/pair-out jackknife (and BCa on blocked designs), subsampling and m-out-of-n bootstrap no longer return all-NAon blocked or matched designs (and, for subsampling and m-out-of-n, on every design); the worker now reads row indices from list-shaped resampling draws (v1.0.6-TODO-127).KK IVWC Bayesian bootstrap: replicates are now weighted refits of each class’s own inverse-variance-weighted estimator (stratified Cox, LWA Cox, OLS, conditional logit, mean difference, Newcombe, rank regression). They used to be a raw mean difference, all zero for
InferenceSurvivalKKStratCoxPHIVWC.InferenceContinKKQuantileRegrIVWCandInferencePropKKQuantileRegrIVWCsupport the Bayesian bootstrap, each replicate refitting both halves by weightedquantreg::rq()under the Dirichlet weights and pooling them by inverse variance (see Breaking changes for the classes that no longer offer it). Also fixed: the Weibull frailty IVWC randomization statistic (wrong fixed parameter in the reservoir refit, state-dependent pooling, dropped Loggamma covariates), the Wilcox IVWC worker returning the W statistic to m-out-of-n, subsampling and jackknife on fixed matched designs, and the rank-regression ISMB seed depending on row names (v1.0.6-TODO-217, v1.0.6-TODO-235).InferenceSurvivalKKStratCoxPHIVWC,InferenceSurvivalGLMMWeibullFrailtyNormalIVWCandInferenceSurvivalGLMMWeibullFrailtyLoggammaIVWC:compute_estimate(estimate_only = TRUE)now returns the same inverse-variance-weighted combination ascompute_estimate(); it used sample-size weights (StratCox) or 50/50 weights (Weibull frailty). Jackknife, reusable-worker and slow-path resampling replicates, and the CIs and p-values built from them, now resample the reported estimator and change. Results from a fresh full call are unchanged. The Weibull frailty classes andInferenceIncidKKCondLogitIVWCalso no longer lose their standard error (NAWald CI and p-value) whenestimate_only = TRUEwas called first. Resampling is about 20% slower for the Weibull frailty classes (v1.0.6-TODO-132).
Model fits: all response types
A Wald confidence interval or p-value whose standard error is unavailable now returns
NA, records the reason (procedure_failure_reason$wald) and warns once per fit with classedi_wald_unavailable_warning. It no longer substitutes the nonparametric bootstrap, which these classes used to do silently or with an unclassed warning:InferenceCountKKHurdlePoissonOneLik(testing_type = "wald"andcompute_wald_*()),InferenceCountHurdlePoisson,InferenceCountZeroInflatedPoisson,InferenceCountZeroInflatedNegBin,InferenceOrdinalGCompMeanDiff(asymptotic andcompute_wald_*()), the confidence intervals ofInferenceSurvivalLogRankandInferenceSurvivalGehanWilcox(and so the log-rank class’s CI-inverted p-value), and the right-censored intervals and p-values ofInferenceSurvivalKMDiffandInferenceSurvivalRestrictedMeanDiff. The testing type you ask for is the test you get; callcompute_bootstrap_confidence_interval()orcompute_bootstrap_two_sided_pval()for the bootstrap. On left- and interval-censored data, where the KM-median and RMST differences have no analytic standard error, those two classes still return the bootstrap (v1.0.6-TODO-380).The asymptotic rank-test p-values no longer fall back to the bootstrap:
InferenceSurvivalLogRank$compute_asymp_log_rank_two_sided_pval_for_treatment_effect()when the log-rank null variance (right-censored) orinterval::ictest()’s p-value (left- / interval-censored) is unavailable, andInferenceSurvivalGehanWilcox$compute_asymp_two_sided_pval()when the interval-censored p-value is unavailable. They now returnNA, recordprocedure_failure_reason$rank_test("rank_test_asymptotic_pvalue_unavailable") and raise oneedi_rank_test_unavailable_warning(anedi_procedure_na_warning) per fit. Callcompute_bootstrap_two_sided_pval()for the bootstrap (v1.0.6-TODO-417).Wald standard errors, p-values and CIs of likelihood-backed classes now always use the observed information, and
compute_wald_confidence_interval(),compute_wald_two_sided_pval(),get_standard_error(),InferenceSuite’ssecolumn and the CI-inversion seeds use the same standard error ascompute_asymp_confidence_interval(). ForInferenceIncidBinomialIdentityRiskDiff,InferenceIncidLogBinomial,InferenceContinKKGLMMandInferenceCountKKGLMMthey used a different information matrix (or, for the Count KK GLMM, skipped the jackknife inflation), 1% to 26% apart.set_information_preference()affects only score tests and score CIs (“fisher” stays the default there). For the cumulative-link ordinal classes under the default “fisher” preference, thesecolumn, the Wald fallback used when the fit has no SE, and CI-inversion step sizes now use the observed SE, so score CI endpoints move within the root finder’s tolerance (v1.0.6-TODO-220, v1.0.6-TODO-215).Count, probit and other likelihood fits no longer report convergence too early, or a correct fit as unconverged, when the design is ill-conditioned or a covariate has a large scale or offset. The L-BFGS wrapper, Newton and the Poisson and probit IRLS kernels share a scale-aware Newton-decrement rule (glm’s relative deviance tolerance); an L-BFGS stop that fails it is finished with damped Newton steps. Example:
InferenceCountNegBinoncolongave -0.248 (reported converged) whereMASS::glm.nbgives -0.211; it now gives -0.211. Fits that already met the gradient test are unchanged (v1.0.6-TODO-169, v1.0.6-TODO-170).Inference objects now detect covariates that make the response (on a scale suited to its type) an exact linear function of treatment and covariates, which in a randomized experiment almost always means leakage. They drop those columns from every fit and resampling replicate and raise one
edi_perfect_predictor_warningnaming them. Results on data without a perfect predictor are unchanged (v1.0.6-TODO-158).InferenceAllSimpleWilcoxnow returns the Hodges-Lehmann estimate (the arm difference) and the ties-corrected rank-sum p-value when each arm is constant, instead of anNAestimate. The rank-test confidence interval does not exist there, so it is returned asNAwith a classededi_wilcox_ci_unavailable_warning(v1.0.6-TODO-59).
Continuous responses
InferenceContinKKGLMM’s parametric bootstrap (compute_param_bootstrap_*()and the likelihood-ratio bootstrap) simulated each dataset with the residual and pair standard deviations swapped, so when the pair SD was near 0 the simulated data had almost no within-pair noise: the bootstrap CI came out about 40-70 times narrower than the Wald CI and the p-value sat at its floor (a 5% test rejected a true null 75% of the time in a small simulation; 10% after the fix, the likelihood-ratio bootstrap 6.7% before and 8.3% after). The simulator now reads the variance components in the kernel’s order (v1.0.6-TODO-291, v1.0.6-TODO-56).-
The C++ robust-regression kernel (
fast_robust_regression_cpp(), used whenuse_rcpp = TRUE, the default) now computes the same estimator asMASS::rlm(). Results change forInferenceContinRobustRegr,InferenceContinKKRobustRegrIVWC,InferenceContinKKRobustRegrOneLikand the robust randomization/bootstrap kernel:- With
method = "M", the estimate changes. The kernel fixed the MAD scale once, from the OLS residuals (which outliers pull), whererlm()re-estimates it every iteration, and it stopped on the change in the coefficients rather than in the residuals. The two paths differed by about 1% (up to 6%); they now agree to rounding error. The defaultmethod = "MM"keeps its fixed scale, so its estimates do not change. - With
method = "M", the fit now stops at once when its OLS start is an exact fit (median absolute residual 0), returning the start as converged, asMASS::rlmdoes. It used to floor the start scale at 1e-10 first, so it took one more weighted step; when the zero-residual points did not pin down every coefficient, that step moved the estimate away fromrlm’s. Fits whose start has a nonzero MAD are unchanged (v1.0.6-TODO-273). - With either method, the standard error now includes the small-sample factor kappa that
summary.rlm()applies, so standard errors are slightly larger, and the KK IVWC classes’ inverse-variance weights change with them. - The KK robust classes’ default
maxitis 100 for every number of covariates (it was 10 to 20, below whatrlm()needs once the scale is re-estimated). A fit that still does not converge now givesNA, as theuse_rcpp = FALSEpath already did, instead of the unconverged iterate.
- With
The CR2 cluster-robust standard error used by
InferenceContinOLSandInferenceContinLinon cluster designs no longer falls back silently to the independent-subjects SE when the response is measured in small units (e.g. y * 1e-8): the not-estimable floor is now relative to the scale of the response, and the variance matchesclubSandwich::vcovCR(type = "CR2")at every scale (v1.0.6-TODO-58).
Incidence responses
InferenceIncidRiskDiffreturns the finite risk-difference estimate on a perfect fit (e.g.y = w, RD = 1, or an all-zero response, RD = 0) instead ofNA; only the HC0 standard error is non-estimable there (reasonmodel_standard_error_unavailable). The zero sandwich variance used to make every column-dropping refit fail, which lost the estimate (v1.0.6-TODO-389).InferenceIncidKKGEEandInferencePropKKGEEreturnNAfor the asymptotic p-value and confidence interval, withedi_logistic_separation_warning, only when the data are (quasi-)completely separated. Before, the collapsed sandwich standard error gave p ~ 0 under separation. A fitted probability within 1e-8 of 0 or 1 alone does not trigger this: a single high-leverage subject can cause one in a fit whose solution exists (in one example, estimate 0.67 and p 0.45, where that screen alone gaveNA), so the screen is confirmed by an exact separation check. Separated fits warn once; the point estimate is unchanged.InferenceOrdinalKKGEEdoes the same, and the KK GEE jackknife methods now returnNAwith a warning (reasonjackknife_full_data_separation) when the full-data fit is separated, instead of meaningless finite values (a jackknife estimate of the wrong sign was seen). The ordinal KK GEE also no longer returns a silentNAfit when a standard error is requested after an estimate-only fit on separated data (v1.0.6-TODO-118, v1.0.6-TODO-122, v1.0.6-TODO-274).-
InferenceIncidBinomialIdentityRiskDiffandInferenceIncidLogBinomial:- They no longer silently drop covariates when the default cold start lies outside the mean support. The least-squares start could give a fitted probability outside [0, 1], so the kernel stopped after one iteration and the class reported a reduced model. The start is now pulled 90% of the way to the support boundary, toward the intercept-only fit; feasible starts are untouched. Estimates, intervals and p-values change on data where the old fit failed, including some bootstrap and jackknife replicates. Bootstrap subset copies made outside an active resampling operation (for example the outer loop of
ci_calibrated_bootstrap()) now follow the same warm-start policy as copies made inside one, instead of inheriting the parent’s warm start (v1.0.6-TODO-142). - The identity- and log-binomial kernels (and their weighted variants) no longer report convergence short of the maximum likelihood estimate when a start lies next to a mean bound: convergence now also requires the observed-information Newton step to agree, so randomization and bootstrap draws reach the MLE (v1.0.6-TODO-221). When Fisher scoring is slow near (not on) a mean bound, they switch to observed-information Newton steps after 20 iterations: a fit that used to hit the iteration cap, drop covariates and report a different estimate (0.083 vs the MLE 0.167) now reaches the MLE (v1.0.6-TODO-267). They also redo a fit from the cold start when a warm Fisher information from other data makes the first step fail, instead of returning the warm start unconverged (v1.0.6-TODO-209).
- Randomization p-values are reproducible and the same on the reusable-worker and slow paths. For the identity link, warm-started refits that stalled at their start were counted as null draws equal to the observed estimate (about 30% of draws), and the observed statistic drifted between calls; a stalled fit now refits cold (v1.0.6-TODO-205). For the log link, the randomization statistic is now the cached point estimate, so it matches the reusable worker and repeated seeded calls agree (v1.0.6-TODO-209).
- They no longer silently drop covariates when the default cold start lies outside the mean support. The least-squares start could give a fitted probability outside [0, 1], so the kernel stopped after one iteration and the class reported a reduced model. The start is now pulled 90% of the way to the support boundary, toward the intercept-only fit; feasible starts are untouched. Estimates, intervals and p-values change on data where the old fit failed, including some bootstrap and jackknife replicates. Bootstrap subset copies made outside an active resampling operation (for example the outer loop of
The logistic regression kernel (
fast_logistic_regression_cpp,_weighted_cpp,_with_var_cpp) now reruns a non-converging IRLS fit with step halving, so a poor warm start (e.g. in the g-computation bootstrap refits) converges instead of running to |b| ~ 1e9. When the absolute gradient test fails, it also accepts a scale-aware Newton-decrement criterion, so fits with large-offset covariates are no longer reported as not converged (v1.0.6-TODO-192, v1.0.6-TODO-170). In that rerun the step taken at the last allowed iteration is now checked too: a fit that hitmaxitcould return a log-likelihood far below its starting point (e.g. -36768 against -408 from a far warm start atmaxit = 1); it now never returns a worse fit than it started from. A fit that stops atmaxitalso reports its fitted probabilities, score, gradient norm and Fisher information at the returned coefficients; before, they belonged to the iterate one step earlier, even when the fit was declared converged. Coefficients of fits that converged before are unchanged (v1.0.6-TODO-272).The g-computation risk-ratio and risk-difference classes (
InferenceIncidKKGCompRiskRatio/RiskDiff,InferenceIncidGCompRiskRatio/RiskDiff) no longer reuse a non-converged weighted refit as the starting point for the next bootstrap replicate. In the KK classes one such fit made every later Bayesian-bootstrap replicate return RR = 1 (RD = 0) with anNAstandard error, causing undercoverage and non-finite intervals. A failed refit is now retried from the full-data fit and then cold, and is never cached (v1.0.6-TODO-192).-
InferenceIncidExactZhang:-
compute_estimate()now returns the Haldane-Anscombe log odds ratio of the pooled 2x2 table over all subjects, as documented. It used only the unmatched (reservoir) subjects, so on matching designs it ignored the matched pairs and was always 0 when every subject was matched. Bernoulli designs, the exact p-values and the exact confidence intervals are unchanged by this fix (v1.0.6-TODO-147). -
compute_exact_confidence_interval()(and thetype = "Zhang"randomization CI for incidence) now inverts the combined test it reports. Its endpoint search started from the log odds ratio of the reservoir subjects only. With every subject matched (DesignFixedBinaryMatch) that is always 0, so the interval held 0 even when the test rejected (coverage 1.00 at the null); with a small reservoir (KK designs at large n) a start the test rejects gave a wrong endpoint (coverage 0.85-0.88 at n = 1000 onDesignSeqOneByOneKK21, while the test’s size was 0.03). The search now starts from a point the combined test accepts. Intervals that already started from an accepted point do not change. - The exact confidence interval is now the convex hull of every effect value the combined exact test accepts (Blaker 2000; Fay 2010). The combined p-value is not monotone, and the interval used to be only the accepted piece around the search start, too narrow in about 1-2% of matching-design cases. An endpoint on one of the p-value’s jumps is now reported at the jump itself (e.g. exactly 0 instead of -1e-7); other endpoints move by at most 1e-6. The interval takes 1.7-2.8x as long (v1.0.6-TODO-233).
- On a matching design the exact interval now returns
NAbounds with anedi_procedure_na_warning(reasonexact_ci_empty_acceptance_set) when the matched-pair and reservoir parts of the combined exact test reject every log odds ratio; before, it returned a near-zero-width interval at a rejected point. When the search’s starting points are all rejected, a grid search now finds an accepted region the old search missed (v1.0.6-TODO-216).
-
InferenceIncidExactFishernow reports the estimate as nonestimable (reason"exact_fisher_conditional_mle_infinite") when the conditional MLE of the log odds ratio is infinite, as happens when the table is separated (for example, every discordant matched pair favors the same arm). It used to returnInfor-Inf, whichInferenceSuitelisted as an “ok” row. The exact p-value and confidence interval are unchanged.
Count responses
InferenceCountHurdleNegBinno longer drops its covariates when the positive counts are Poisson-like (v1.0.6-TODO-425). The zero-truncated negative-binomial count part can then stop at an enormous dispersion (theta of 1e7 to 1e15, depending on the platform’s floating point), where its observed information is numerically meaningless; the treatment variance came out negative, the fit was rejected and the class fell back silently to the treatment-only model, a different estimate, without its hurdle separation warning. At theta >= 1e4 an unusable information is now replaced by the information of the Poisson limit (the zero-truncated Poisson count part, dispersion dropped), so the covariate fit is kept and its standard error matchesInferenceCountHurdlePoisson’s. Fits whose information was usable are unchanged.Count-model results no longer depend on what was computed before (v1.0.6-TODO-345).
InferenceCountNegBin’s score / gradient / likelihood-ratio null fits now always start from the full-data MLE instead of the object’s mutable warm start (which a score-CI search moved), so the score p-value is the same with and without a prior CI (it was 0.8837140 fresh and 0.8837136 after a CI in the docs-scenario case).InferenceCountPoisson,InferenceCountQuasiPoissonandInferenceCountRobustPoissonno longer keep a separated fit (a coefficient beyond +-15, e.g. every control count 0) as a warm start: randomization refits started there could not move, so every draw equalled the observed estimate and the randomization p-value was 1 (or NA). They now cold-start, as a fresh fit does.InferenceCountPoisson,InferenceCountQuasiPoissonandInferenceCountRobustPoissonno longer return an estimate of 0 for large counts (cell means around 2e4) under the default zero cold start (v1.0.6-TODO-394, v1.0.6-TODO-395, v1.0.6-TODO-396). The first IRLS step frombeta = 0overshot so far that no step-halving was accepted and the fit stopped atbeta = 0, unconverged, which the classes accepted. The Poisson IRLS kernel (fast_poisson_regression_cpp()and its weighted / with-variance / quasi-Poisson variants) now refits once from thelog(y + 0.1)start when the zero start does not converge, and the three classes reject an unconverged fit instead of reporting it. Fits that converged from the zero start are unchanged. The kernel part takes effect after the package is rebuilt.InferenceCountPoisson:testing_type = "lik_ratio_bartlett_approx"(andcompute_lik_ratio_bartlett_approx_confidence_interval()/_two_sided_pval()and the best-availablecompute_lik_ratio_bartlett_confidence_interval()/_two_sided_pval()) is now the model-only Bartlett-corrected likelihood-ratio test, as it already was onInferenceCountKKCondPoissonOneLikandInferenceCountKKHurdlePoissonOneLik. It used to report the larger of that p-value and the design jackknife-Wald p-value, and the union of the two intervals, so its intervals can now be narrower and its p-values smaller. The old result is the new testing type"lik_ratio_bartlett_approx_design_conservative", which reproduces it exactly (v1.0.6-TODO-380).InferenceCountZeroInflatedPoisson,InferenceCountHurdlePoisson,InferenceCountZeroInflatedNegBinandInferenceCountHurdleNegBin:compute_asymp_confidence_interval()andcompute_asymp_two_sided_pval()now use the test chosen withset_testing_type(). They always returned the Wald result, so"score","gradient","lik_ratio"and"lik_ratio_bartlett_approx"gave the Wald p-value and interval; each now equals the matchingcompute_<type>_two_sided_pval()/_confidence_interval(). Wald results are unchanged. Also,InferenceCountHurdleNegBin$compute_gradient_confidence_interval()returned the Wald interval unless the testing type was set to"gradient"; it now always inverts the gradient test (v1.0.6-TODO-413).InferenceCountPoisson: the design-conservative tests (every asymptotic and likelihood test, which report the larger of the model-based and jackknife p-values and the union of the two intervals) lost their jackknife half on blocking designs whose automatic jackknife unit is the whole block, such asDesignSeqOneByOneRandomBlockSize. With fewer than 5 blocks that jackknife isNA, so the raw Poisson test was reported alone, and it is anti-conservative under overdispersion: with~ 1on a 4-stratum design it rejected a true null 17-19% of the time at a nominal 5%. The class now falls back to the stratified delete-1 jackknife,unit = "observation_within_block"(Wolter 2007, Sec. 4.5), the estimatorDesignFixedBlockingnow uses automatically, which brings the size to about 3-5%. On these designs p-values can rise and intervals widen. Other designs and other classes are unchanged (v1.1.0-TODO-218).InferenceCountZeroInflatedNegBinno longer accepts a fit that is not the maximum-likelihood fit. Its default Newton-Raphson fitter, started from a warm start, could stop at the zero-inflation-off negative binomial fit or on a separation ridge even when a fit with a higher likelihood existed. This happened most often on the permuted data of the randomization test (13-14% of draws at n = 50), which then rejected a true null about 8% of the time instead of 5%. A fit that looks suspect (not converged, at the zero-inflation boundary, a zero-inflation coefficient beyond 10 in absolute value, or a gradient norm above 1e-5) is now refit with L-BFGS from a cold start and from the warm start, and the fit with the highest likelihood is kept. This applies to every fit the class makes: the estimate, the tests and CIs, and the randomization and bootstrap draws. Point estimates can change where the old fit was not the maximum (they now agree withpscl::zeroinfl()), randomization p-values change, and small samples run more slowly because about half the fits at n = 50 need the extra refits (v1.0.6-TODO-222).InferenceCountZeroInflatedPoisson: each fit also runs L-BFGS frompscl::zeroinfl()’s default start and from a start with a sharpened zero part, and keeps the fit with the lowest negative log-likelihood. Estimates that sat at an interior local maximum change (e.g. 1.138 to -0.466, now matching pscl), and small-sample fits that stopped unflagged at an interior local maximum below a separated zero-inflation ridge now reach the higher likelihood and carry the zero-part separation warning; fits already at the maximum are unchanged. ZIP fits are about 1.8x slower (v1.0.6-TODO-152, v1.0.6-TODO-232).InferenceCountZeroInflatedPoisson/InferenceCountZeroInflatedNegBin: randomization, bootstrap-randomization and parametric-bootstrap refits are no longer warm-started from a full-data fit whose zero-inflation part sits on a flat ridge (a fitted zero-inflation logit of 10 or more in absolute value); they are cold-started like a fresh fit. On such data every ZIP randomization replicate used to differ from a fresh fit (by up to 0.84), and so did half the ZINB ones (up to 0.64). The ZIP bootstrap-randomization reusable worker now equals the slow path. Results on data with a well-identified zero part are unchanged (v1.0.6-TODO-30).When the zero-inflation (or hurdle) part of
InferenceCountZeroInflatedPoisson,InferenceCountZeroInflatedNegBinorInferenceCountHurdlePoissonhas no finite maximum likelihood estimate, its coefficients are now reported asNAand the count-part treatment estimate is kept. If the zero-inflation part is only driven toward no inflation (no fitted zero-inflation probability above 5%, or ZINB’s zero-inflation-off boundary fit), a message of classedi_no_zero_inflation_messagesays there is no evidence of zero inflation; otherwise (some subject pushed to a structural zero, and always for the hurdle part) a warning of classedi_zero_part_separation_warning(a subclass ofedi_logistic_separation_warning) is raised.InferenceCountHurdleNegBinnow raises the same warning when its hurdle part is separated (v1.0.6-TODO-152, v1.0.6-TODO-218).Zero-augmented count models (
InferenceCountHurdlePoisson,InferenceCountZeroInflatedPoisson,InferenceCountZeroInflatedNegBin,InferenceCountHurdleNegBinand the KK hurdle-Poisson classes) now drop count-part covariates that are aliased on the subjects with a positive count, the same as whatglmdoes with aliased columns, with oneedi_covariate_dropped_warning. Previously such fits drifted along an unidentified direction (arbitrary ZIP/ZINB estimates,NAstandard errors and CIs) or, with few positive counts, wereNA; they now give the estimate of the model without those columns. Results on full-rank data are unchanged (v1.0.6-TODO-195).Hurdle and zero-inflated count models (
InferenceCountHurdlePoisson,InferenceCountHurdleNegBin,InferenceCountZeroInflatedPoisson,InferenceCountZeroInflatedNegBin, and the KK hurdle-Poisson classes) now report the treatment effect as non-estimable when the positive counts do not identify the count-part treatment coefficient (e.g. a single positive count). The fit used to return its starting values, so the estimate was arbitrary and the randomization null distribution collapsed to a constant equal to it (v1.0.6-TODO-186, v1.0.6-TODO-195). For the hurdle models, when every positive count in one arm equals 1, the count-part treatment estimate is nowNAwith anedi_hurdle_count_mle_not_finite_warning(its MLE is infinite) instead of the optimizer’s stopping point (v1.0.6-TODO-195).
Ordinal responses
The KK CLMM classes (
InferenceOrdinalKKCLMM,...Probit,...Cauchit,...Cloglog) integrate the random intercept with a 60-node Gauss-Hermite rule instead of 20 (owner ruling, v1.0.6-TODO-48; the Poisson GLMM made the same change on 2026-10-24). At a fitted random-intercept SD of about 2 or more the 20-node rule’s likelihood was off enough that the fit was not the MLE: on a cloglog example (n = 60) the treatment estimate was 0.8146 againstordinal::clmm’s 0.7755 and is now 0.7752. Every KK CLMM estimate, SE, p-value and CI changes slightly (typically by 1e-5 or less at a small SD). The kernel runs its variance multistart on a 20-node rule and refits only the winner on the 60-node rule, from its estimates (the reported fit is the 60-node optimum), so a fit takes about 1.1-1.5 times as long as with 20 nodes instead of 2.3-3 times.The KK CLMM classes (
InferenceOrdinalKKCLMM,...Probit,...Cauchit,...Cloglog) fit faster at large n, most visibly in randomization tests. The native kernel now polishes the best of its starts and judges convergence by the projected gradient (a KKT test at the sigma -> 0 boundary), taking damped Newton steps when L-BFGS stops short; before, it reported LBFGSpp’s lenient flag and the R side retried every fit whose gradient norm exceeded 1e-4 with a full five-start Newton run, which at n = 1000 fired on 35-65% of randomization redraws and cost 6-9 s each. The retry, now rare, starts from the fitted point only (the extra log-sigma starts are kept for a far-from-stationary boundary fit), and a fit whose projected gradient is already below that 1e-4 acceptance is not polished, so no fit pays for both the polish and the retry. Measured against 1.0.5 with the 60-node rule above included (calibration design, null, SeqOneByOneKK14 and FixedBinaryMatch, same seeds and redraws, r = 21, one core): a randomization p-value at n = 1000 with~ .is 2.7x-3.8x faster for logit and 1.4x for Cauchit (a single logit fit drops from about 7 s to 1.1-1.2 s); with~ 1at n = 1000 and at n = 200, where 1.0.5 rarely retried, it is 1.0x-1.9x slower, the price of the 60-node rule. Against the 20-node kernel change alone the gain was 2.1x-4.0x at n = 1000~ .(v1.1.0-TODO-265). Estimates, SEs and Wald p-values move by at most 5e-6 (n = 50, 200, 1000; all four links, both formulas). At n = 50 a few degenerate randomization redraws (sigma near e^4, |treatment| 12-61) that used to beNAnow return a value, so some n = 50 randomization p-values move (5 of 80 checked, by up to 0.04).fast_ordinal_clmm_cpp()gainsvariance_multistartand returnsparams,lbfgs_gradient_norm,variance_boundary_hit,variance_boundary_tau_scoreand thenewton_polish_*diagnostics; itsconvergedandgradient_normnow describe the projected gradient (convergedmeans a projected gradient norm of at mostmax(1e-4, eps_g)), and withn_ghabove 20 its L-BFGS multistart runs on 20 nodes before the final refit (v1.1.0-TODO-265).The cumulative-link ordinal classes (
InferenceOrdinalPropOddsRegr,InferenceOrdinalOrderedProbitRegr,InferenceOrdinalCauchitRegr,InferenceOrdinalCloglogRegr) now use the expected Fisher information wherever “fisher” information is used; before, it was the observed information under a “fisher” label. This changes default score-test p-values and score CIs, and improves small-sample score-test size for the cauchit and cloglog links (n = 40: 0.092 to 0.053 for cauchit).InferenceOrdinalPropOddsRegrnow offersset_information_preference("fisher")and uses it by default. Wald and likelihood-ratio results are unchanged (v1.0.6-TODO-201).InferenceOrdinalPartialProportionalOddsRegr: when a nonparallel covariate makes it fit throughVGAM::vglm, the Wald standard error, CI and p-value now use the observed information at VGAM’s estimate rather than VGAM’s expected (Fisher-scoring) information, matching the fast solver and theordinal::clmfallback. Estimates are unchanged; on simulated data the SE moved by a median of 0.1-0.8% at n = 40-300 (at most about 6%). If the observed information is not positive definite, the class falls back toordinal::clm(v1.0.6-TODO-215).InferenceOrdinalGCompMeanDiffandInferenceOrdinalStereotypeLogitRegrnow centre and scale covariates internally like the other ordinal classes, so their estimates no longer depend on covariate units or offsets. The g-computation mean difference could be badly off (0.26 vs 0.19 on thecolondata), and the stereotype fit could stop at a worse optimum or drop every covariate and returnNA(v1.0.6-TODO-172).InferenceOrdinalOrderedProbitRegrreturnsNAinstead of 0 when the response has a single level, and its bootstrap no longer counts single-level draws as zero estimates. The cauchit, cloglog and probit kernels now agree on these edge cases: they validate inputs before the one-level early return and report a non-positive treatment variance as NaN (v1.0.6-TODO-203).
Survival responses
Weibull AFT fits no longer fail on covariates left on their raw scale. With columns such as age in years or lymph-node counts next to the intercept, the likelihood was badly conditioned and the fitter (
fast_weibull_regression_cpp()and its left-/interval-censoring sibling) stopped at the iteration limit far from the optimum, soInferenceSurvivalWeibullRegrdropped covariates with anedi_covariate_dropped_warningand reported the reduced model. On the colon cancer trial of the case-study article (survival::colon) it dropped six of eleven covariates. The fitter now standardizes badly scaled columns internally and maps the coefficients, covariance, information, score and gradient norm back to the original scale, and the class refits on standardized columns when a fit on unscaled covariates fails to converge, so those fits keep every covariate and agree withsurvival::survreg(). Fits on well-scaled covariates (every column near unit scale), and fits that already converged, are unchanged; fits on badly scaled covariates change, including the Weibull classes built on the same fitter (KK marginal Weibull, GLMM Weibull frailty) and the Weibull randomization-bootstrap kernel (v1.0.6-TODO-163, v1.0.6-TODO-161).The Bayesian-bootstrap replicates of the Cox classes now use Breslow ties, like their point estimates. The weighted refit behind each replicate called
survival::coxph()with its default Efron ties, while every EDI Cox estimate uses Breslow, so on tied event times the replicates fit a different partial likelihood from the estimate. This affectsInferenceSurvivalCoxPHRegr,InferenceSurvivalStratCoxPHRegr,InferenceSurvivalKKStratCoxPHIVWC,InferenceSurvivalKKStratCoxPHOneLik,InferenceSurvivalKKLWACoxPHIVWCandInferenceSurvivalKKLWACoxPHOneLik. Bayesian-bootstrap draws, intervals and p-values change on tied data; data without ties give the same results. The weighted Cox surrogate ofInferenceSurvivalDepCensTransformRegrkeeps Efron ties, since its estimate is not a Cox fit (v1.0.6-TODO-271).Cox-model parametric-bootstrap and simulation paths no longer understate the Breslow baseline hazard when a late risk set holds only subjects with very low relative risk: the absolute 1e-10 floor on the rescaled risk-set sum is removed, with a log-scale rescale used only on underflow. Results on ordinary data are unchanged (v1.0.6-TODO-51).
InferenceSurvivalLogRankandInferenceSurvivalGehanWilcoxon left- or interval-censored data now always report treatment minus control.interval::ictest()orders the arms by which one appears first in the data, so the estimate’s sign used to depend on whether subject 1 was treated, and bootstrap, jackknife and randomization draws had an essentially random sign. That broke percentile and BCa intervals and bootstrap p-values. Two-sided asymptotic p-values are unchanged (v1.0.6-TODO-117, v1.0.6-TODO-121).InferenceSurvivalRestrictedMeanDiff: with no usertau, the default horizon (the smaller of the arms’ maximum follow-up) is now computed once from the observed data and held fixed in every randomization, randomization-bootstrap, bootstrap and jackknife draw, instead of being recomputed from each draw’s arms. Point estimates and Wald results are unchanged; randomization p-values and resampling results change. The per-draw horizon made the null distribution compare RMSTs over different horizons, so the randomization test could have power below alpha at large effects (0.03 vs 0.99 in a simulation with n = 40). Prespecifyingtauis still recommended (v1.0.6-TODO-115).-
InferenceSurvivalKKStratCoxPHIVWC:- The matched-pair stratified Cox fit is no longer discarded when a covariate is constant within every pair (for example a rare binary covariate whose carriers are all in the reservoir, or a bootstrap or jackknife draw that omits them). Such columns are now dropped as
survival::coxph(strata = )drops them, so the estimate and standard error combine both halves; before, the estimate came from the reservoir alone or wasNA. An estimate that is stillNAnow warns (v1.0.6-TODO-128). - The reservoir’s treatment-only fallback Cox fit now passes the same usability check as the other reservoir fits, so a separated reservoir (infinite coefficient) is dropped, with
edi_kk_strat_cox_ivwc_reservoir_dropped_warning, instead of entering the estimate. A reservoir with an empty arm no longer triggers a hidden error and is dropped with the same warning, since it carries no treatment contrast (v1.0.6-TODO-133).
- The matched-pair stratified Cox fit is no longer discarded when a covariate is constant within every pair (for example a rare binary covariate whose carriers are all in the reservoir, or a bootstrap or jackknife draw that omits them). Such columns are now dropped as
Reproducibility across core counts
SimulationFramework: a serial run (num_cores = 1) now seeds replicationiwithseed + i, as the parallel paths do, so a seeded simulation gives the same results at 1 and 2 cores, and a run resumed withcontinue_from_last_result_row = TRUEequals a fresh run instead of replaying the first replications’ data (v1.0.6-TODO-354). Serial results for a givenseedchange.SimulationFrameworkReport$new(sim, alpha = a)now tests coverage against the alpha the intervals were built at (the framework’s) and usesaonly for power and size (v1.0.6-TODO-356).InferenceIncidGCompRiskDiffandInferenceIncidBinomialIdentityRiskDiffare now scored against the risk difference rather than the logit-scalebetaT(coverage was 0 and the MSE wrong; v1.0.6-TODO-357).InferencePropGCompMeanDiff’s nonparametric bootstrap (confidence interval, p-value andapproximate_bootstrap_distribution_beta_hat_T()) no longer depends on the number of cores. Each worker chunk drew its resamples from its own random-number stream, so the same seed gave a different interval at 1, 2 and 4 cores. Every replicate’s resample, and the seed for any redraw the separation screening asks for, is now drawn before the work is split. Seeded multi-core results change; single-core results change only for replicates that needed a redraw (v1.0.6-TODO-22).Seeded randomization-bootstrap p-values that draw each replicate’s assignment lazily (
type = "smoothed", and the percentile path for classes without a fast kernel or reusable worker) no longer depend onset_num_cores(): each draw now replays its own seed. Results atnum_cores = 1change by Monte Carlo noise on these paths (v1.0.6-TODO-53).glmmTMB fits (hurdle negative binomial, the zero-augmented Poisson family, the KK GLMM classes) now run TMB on one thread, so their estimates and every bootstrap replicate no longer depend on
set_num_cores()(v1.0.6-TODO-62, v1.0.6-TODO-64).InferenceSuite$run_all_inference()is now reproducible afterset.seed(): each task runs from its own seed, drawn once from the caller’s stream, with no randomization draws carried over from earlier tasks, runs or direct calls on the same design, andnum_cores = 2gives the same results asnum_cores = 1. Seeded suite results differ from earlier versions (v1.0.6-TODO-219).
New features
The KK CLMM classes (
InferenceOrdinalKKCLMM,...Probit,...Cauchit,...Cloglog) offer an opt-in randomization statistic for large n:compute_rand_two_sided_pval(type = "score"). It is the score for the treatment coefficient at the null fit: the CLMM is fit once with the treatment coefficient fixed at 0, and each redraw costs one inner product instead of a refit. With r = 501, a p-value takes 0.1-0.5 s at n = 50-200 and 1-2 s at n = 1000, against 40-260 s and 560-1,170 s for the default statistic (250x-650x faster). Like any randomization test it is exact under the sharp null, with the same draws, tie rule and +1 counting as the default, but it is a different statistic, so p-values and power differ (n = 50, a 50%-power effect: rejection rate 0.43 against 0.37). It tests onlydelta = 0, and so does the default statistic for these classes now: a nonzerodeltaerrors, because the shared delta-shift moved the ordinal levels (testing “treated labels moved by delta”, not “log-odds coefficient = delta”) and no sharp null exists on the latent log-odds scale. These classes still offer no randomization CI (DECISION-v1.1.0-TODO-267b). The default (type = NULL) is unchanged; other classes rejecttype = "score"(v1.1.0-TODO-267).New testing type
"lik_ratio_bartlett_approx_design_conservative"onInferenceCountPoisson,InferenceCountKKCondPoissonOneLikandInferenceCountKKHurdlePoissonOneLik: the larger of the model-only Bartlett-corrected likelihood-ratio p-value and the design-based Wald p-value (the jackknife Wald forInferenceCountPoisson), and the union of the two intervals, the rule these classes already apply to"score","lik_ratio"and"gradient"."lik_ratio_bartlett_approx"stays the model-only test. Select it withset_testing_type()and callcompute_asymp_confidence_interval()/compute_asymp_two_sided_pval()(v1.0.6-TODO-380).InferenceSuite$run_all_inference()gainsr(draws for the randomization and randomization-bootstrap tests and CIs) andB(replicates for the nonparametric, Bayesian and parametric bootstrap and the parametric-bootstrap likelihood-ratio tests and CIs). Both default toNULL, which keeps each method’s own default, and are recorded in the result asresample_counts(v1.0.6-TODO-210).The randomization test (
compute_rand_two_sided_pval()with a nonzerodelta) and the randomization confidence interval now work on left- and interval-censored survival data: the null shift rescales the treated subjects’ censoring boundsy_L/y_Rby exp(delta) as it rescales exact times (bounds of 0 andInfstay put). Before, both refused with an error. This makes the Weibull randomization interval for the time ratio available on interval-censored data (v1.0.6-TODO-143).InferenceIncidGCompRiskRatioandInferenceIncidKKGCompRiskRatiogaintype = "symmetric-percentile-t"incompute_bayesian_bootstrap_confidence_interval(): a symmetric studentized Bayesian-bootstrap interval built on the log risk ratio. It covers better in small samples thantype = "studentized", which is built on the raw ratio scale and undercovers (about 0.89 at n = 60); the class docs now say so (v1.0.6-TODO-168).InferenceCountZeroInflatedPoissonandInferenceCountZeroInflatedNegBinnow acceptsmart_cold_start_default, like their hurdle siblings (v1.0.6-TODO-153).
Bug fixes
Designs
A fixed design (or
ObservationalDesign) built with the defaultn = NULLnow takesnfromnrow(X_all)inadd_all_subjects_to_experiment()(owner ruling, v1.0.6-TODO-298). It used to stop with “you must specify n upon initialization” althoughX_allgives n. A givennthat disagrees withnrow(X_all)still errors (“X_all must have exactly n =rows, but has .”), now whatever the assertion setting, and assigning before the subjects are added with nunknown errors “pass n to $new() or add the subjects first” instead of “replacement has length zero” (or silently assigning nothing). The allocation equals the one withn = nrow(X_all)for the same seed.Sequential designs with a fixed
nnow refuse subjectn + 1with an error (it used to be enrolled:t = n + 1,wgrew,get_n()stayedn, and inference ran onn + 1subjects), and a covariate value whose type differs from its column’s (a number arriving as text) is converted to the stored type, or refused with an error naming the column when it cannot be, with the design left unchanged. It used to warn once and retype the stored column for every earlier subject, which changed later assignments and made the final analysisNA(v1.0.6-TODO-351).clone(deep = TRUE)of a sequential design no longer shares assignment state with the original (v1.0.6-TODO-350).DesignSeqOneByOneSPBRandDesignSeqOneByOneRandomBlockSizekept their per-stratum block queues in an environment,DesignSeqOneByOnePocockSimonupdates its running counts in place, and PocockSimon’s preallocated covariate table was filled in place, so subjects added to the copy changed the original’s next assignments and covariate rows (and the reverse): after a clone the original differed from an uninterrupted run in 5, 12 and 11 of 20 assignments. The queues are now a list, PocockSimon copies its counts before each update, andDesigndeep-copiesdata.tablefields on a deep clone. Seeded allocations are unchanged.DesignFixedRerandomizationwithprop_acceptable: the randomization reference now follows the same law as the realized allocation, so randomization p-values and CIs for this design change. The realized allocation was always the best (lowest M(w)) ofround(1 / prop_acceptable)draws, but the reference draws (randomization tests and CIs) kept the best r ofr / prop_acceptabledraws, which were tighter, and the randomization test over-rejected: 7.25% at nominal 5% in a null simulation (n = 40, two covariates,prop_acceptable = 0.01; KS distance 0.32 between realized and reference M(w)). Each reference draw is now the best of its ownround(1 / prop_acceptable)draws, at the same cost; realized allocations are unchanged (KS distance 0.04, size 6.1%, which is the 5.9% that theb / rp-value rule gives for any valid reference withr = 201) (v1.0.6-TODO-294).DesignFixedFactorialnow requiresfactorsto be a fully named list of whole numbers >= 2.list(subject = 2.5)used to run as a two-level factor and an unnamed list got the nameVar1(v1.0.6-TODO-305).DesignFixedOptimal$get_optimization_diagnostics()$objective_valueis now the documented M(w) for"mahal_dist"and"abs_sum_diff". It was the solver’s internal value, M(w) times 4 n_T^2 n_C^2 / n^4 or 2 n_T n_C / n^2 (a quarter and a half at prob_T = 0.5), which is kept asobjective_value_internal; allocations are unchanged (v1.0.6-TODO-297).Sequential designs: when
add_one_subject_to_experiment_and_assign()fails (for example a covariate refused bymissingness_method = "error"), the subject is no longer left enrolled with no assignment. The design is rolled back to its state before the call, so a corrected retry continues the trial as if the failed call never happened (v1.0.6-TODO-316).Sequential designs created with
n = NULLnow work: KK14/KK21/KK21stepwise no longer crash once covariates are available (with no plannedn, matching starts once the covariate model matrix exists), such designs can be analyzed (including the bootstrap) once every enrolled subject has a response, and responses can be added in any order. A response for a subject who has not arrived is refused with a clear message (v1.0.6-TODO-76, v1.0.6-TODO-77, v1.0.6-TODO-78).Redraws on a sequential design that is still enrolling are now consistent:
DesignSeqOneByOnePocockSimonno longer errors before the last subject arrives; Efron and iBCRD redraws return one row per enrolled subject like every other sequential design (they returned the plannedn); and custom sequential designs see the subject being replayed during a redraw. Redraws on a completed trial are unchanged (v1.0.6-TODO-183).DesignSeqOneByOneKK14,DesignSeqOneByOneKK21andDesignSeqOneByOneKK21stepwiseno longer fail with “object not found” whendesign_formulanames a covariate that is still constant among the subjects enrolled so far, and KK14/KK21 no longer fail when no covariate varies yet among earlier subjects (v1.0.6-TODO-107).DesignSeqOneByOneKK21stepwiseno longer errors (“missing values and NaN’s not allowed” inquantile()) when the responses so far are constant or fit exactly by the covariates (for example with a single covariate, or all-zero counts). The covariate weights fall back to equal weights, asDesignSeqOneByOneKK21already did (v1.0.6-TODO-120, v1.0.6-TODO-63).DesignSeqOneByOneKK14,DesignSeqOneByOneKK21andDesignSeqOneByOneKK21stepwisenow warn whenmorrison = TRUEis passed. The Morrison threshold calibration is not implemented, so the argument was silently ignored and the standardlambda/t_0_pctschedule ran; the documentation now says the argument is reserved.get_block_ids()on a sequential matching design no longer errors with “improperly sized” before the trial is full; it returns the match ids of the subjects enrolled so far (v1.0.6-TODO-46).DesignFixedBlockedClusternow accepts blocks with different numbers of subjects or clusters; it used to error and suggest anequal_block_sizesargument it does not have. The unequal-blocks error of the other blocking designs now names only arguments the class takes.DesignFixedBlocking’s unequal-block-size error no longer saysB_targetwas not given when it was, and no longer advisesB_targetfor categorical strata, whose categories fix the block sizes (v1.0.6-TODO-73).DesignFixedOptimal(objective = "abs_sum_diff")with the defaultsolver = "auto"could run for many minutes with no message (n = 40). The exact MILP now getssolver_args$milp_time_limitseconds (default 30, GLPK); after that the design uses the better of the MILP incumbent and an annealing run and says so, with certificate"annealing_converged"(v1.0.6-TODO-296).
Inference
InferenceCountHurdleNegBinno longer stalls for minutes to hours in a randomization confidence interval. The count part’s expected information (used when the observed information is not positive definite, as at the Poisson limit) built a one-row model for every term of its series; it is now four scalar sums per row, the same quantity. A warm start whose dispersion is past the Poisson boundary (theta > 1e4) is dropped in favour of the cold start, which reaches the same estimate at once. The Ubuntu reproducibility leg of the nightly run hung on this (v1.0.6-TODO-411).compute_rand_two_sided_pval(type = "Zhang")no longer ignorestypewhen assertions are off (toggle_asserts(FALSE), orSimulationFramework‘sturn_off_asserts_for_speed): the dispatch to the Zhang exact test, and the refusals oftransform_responses/ atypethe response cannot use, sat insideif (should_run_asserts()), so the randomization-draw p-value came back instead (0.42 instead of 0.527 in the regression case). The same pattern in the KK GEE classes’ randomization p-value is fixed too (v1.0.6-TODO-405).An
offset()term inmodel_formula(or in a count class’smodel_formula_zero/model_formula_hurdle) is now refused with an error at$new(), whatever the assertion setting. It used to be accepted, echoed byget_model_formula()and silently dropped, so a Poisson, negative-binomial or zero-inflated fit “with” an offset equalled the fit without it. Offsets are not supported yet (v1.0.6-TODO-347). Themodel_formula_zerodocs ofInferenceCountZeroInflatedNegBinand themodel_formula_hurdledocs ofInferenceCountHurdlePoisson/InferenceCountHurdleNegBinnow say that the treatment is always included, so~ 1fits that part on the treatment only.InferenceSurvivalCoxPHRegron interval-censored data: withset_seed(), the Wald CI and p-value (whose SE comes fromicenReg::ic_sp()’s bootstrap) no longer depend on the global RNG state, and the session stream is left as it was (v1.0.6-TODO-313).InferenceSuite$run_all_inference(): the per-estimand summary printedp = NAfor every estimand with a single inference class; it now prints that class’s own p-value (v1.0.6-TODO-312).InferenceSurvivalKMDiff$compute_asymp_two_sided_pval()no longer returnsNAwhen a few bootstrap replicates of its fallback are non-finite while the asymptotic CI (which drops them) is finite; both fallbacks now drop them (v1.0.6-TODO-309).fast_weibull_regression(use_rcpp = FALSE)now fits a covariate matrix with an empty or duplicated column name (e.g.cbind(w, d$age)), or columns namedy/dead, instead of stopping with “failed to converge”, and reports other survreg errors as such (v1.0.6-TODO-307).The Bartlett testing types (
set_testing_type("lik_ratio_bartlett_approx"), and"lik_ratio_bartlett_exact"where supported) now take effect incompute_asymp_confidence_interval()andcompute_asymp_two_sided_pval()onInferenceContinKKOLSOneLik,InferenceCountPoisson,InferenceCountKKCondPoissonOneLikandInferenceCountKKHurdlePoissonOneLik, which silently returnedNULL, and onInferenceCountKKGLMM, which stopped with “Unsupported testing_type”. All five list these types as supported. An unknown testing type is now an error in these classes. Also,InferenceIncidExtendedRobins’s asymptotic CI and p-value no longer returnNAwhen called beforecompute_estimate()(v1.0.6-TODO-327).The stereotype logit kernel’s cold-start fit could stop at a non-optimal boundary point (a loading at plus or minus infinity) and report it as converged; it now fits the adjacent-category model first and frees the loadings from there. Fits whose variance component reaches its boundary (for example a Gaussian LMM random-effect SD of 0) are no longer reported as not converged by the L-BFGS finishing step (v1.0.6-TODO-374).
compute_rand_two_sided_pval()acceptsalternativeon every class. The classes that override the method (InferenceIncidKKGEE,InferencePropKKGEE,InferenceCountPoissonKKGEE,InferenceOrdinalKKGEE,InferenceIncidKKCondLogitOneLik,InferenceSurvivalWeibullRegrandInferenceSurvivalDepCensTransformRegr) failed with “unused argument”. Two-sided p-values are unchanged (v1.0.6-TODO-328).InferenceSuitenow skips classes whose Suggests package is not installed and lists them underunavailable_due_to_missing_packages(and in the screen footer); the registry’srequired_packageswas empty for every class, so such classes were run and failed. Affected: the quantile regressions (quantreg),InferenceOrdinalKKGEE(multgee, geepack),InferenceSurvivalKKRankRegrIVWC(aftgee) andInferenceBaiAdjustedTKK14/KK21(nbpMatching).InferenceOrdinalKKGEE’s missing-geepack error no longer mentions ause_rcppargument the class does not have (v1.0.6-TODO-335, v1.0.6-TODO-336).InferenceSuite$run_all_inference()withmax_secs_per_classand more than one core printed the report and then failed with “arguments imply differing number of rows”, losing every result, whenever a class timed out: the timeout row had notau. Such rows now getNAthere and the results table is always built (v1.0.6-TODO-292).fast_beta_regression_with_var()now passeswarm_start_fisher_infoto the C++ fitter; it was accepted and documented but ignored. No internal caller passes it, so default results are unchanged (v1.0.6-TODO-331).approximate_bootstrap_distribution_beta_hat_T(bootstrap_type = ...)cached its draws byBalone, so on blocking designs a call with onebootstrap_typereturned the draws of an earlier call with another, and a diagnostic call changed a latercompute_bootstrap_confidence_interval()or p-value. The cache (and the randomization-bootstrap one) is now keyed by the bootstrap type too (v1.0.6-TODO-299).InferenceAllSimpleMeanDiffPooledVar: after a randomization p-value or CI, the asymptotic p-value and CI came backNAwith no warning, because the randomization path cached the estimate without the per-arm responses the pooled t statistic reads. They are now rebuilt from the data, so the result no longer depends on which procedure ran first (v1.0.6-TODO-293).set_estimand()andget_supported_estimands()on inference classes that cannot switch estimands (e.g.InferenceCountNegBin,InferenceCountZeroInflatedNegBin,InferenceCountHurdleNegBin) now stop with a clear error of classedi_estimand_not_supportedinstead of “attempt to apply non-function”;get_estimand()returns"conditional"on every class (v1.0.6-TODO-208).InferenceRandCustom: on incidence responses a C++ statistic now gives the randomization p-value atdelta = 0(it was refused), and an R-function statistic now refuses a nonzerodeltalike every other form (v1.0.6-TODO-110, v1.0.6-TODO-81). The class errors when the custom statistic returns other than exactly one value, instead of silently keeping the first (v1.0.6-TODO-83), and warns, naming the statistic argument, when the statistic (R or C++) is not finite on the observed data, instead of silently returningNA(v1.0.6-TODO-111). Its refusal of randomization intervals on count and proportion responses no longer points to a randomization-bootstrap interval the class does not have (v1.0.6-TODO-84).InferenceSurvivalRestrictedMeanDiff: a usertauis no longer wrongly refused on left- or interval-censored data when an arm’s largest time is an exact event. Warnings that suggest other procedures (the bootstrap “extreme interval”NAandedi_cluster_independence_warning) now name only procedures the class supports (v1.0.6-TODO-125).InferenceSurvivalKMDiffon interval-censored data: the asymptotic interval and p-value (which fall back to the bootstrap there) are now finite (v1.0.6-TODO-91, v1.0.6-TODO-90).compute_rand_bootstrap_two_sided_pval(na.rm = FALSE)now returnsNAon any invalid null draw on every path. The studentized and sequential Monte Carlo paths used to drop such draws silently, and the percentile and smoothed paths returned anNAwithout a warning; each case now raises oneedi_bootstrap_nonfinite_na_warning(v1.0.6-TODO-214).Sequential Monte Carlo randomization and randomization-bootstrap p-values (used by the randomization CI searches when r >= 200) no longer return
NAwhen an early batch has fewer than 10 finite null draws, including whenevermc_batch_size< 10; they now draw the next batch. Results are unchanged when every draw is finite (v1.0.6-TODO-166, v1.0.6-TODO-55).The parametric-bootstrap likelihood-ratio confidence interval’s
NAreasons (lik_ratio_bootstrap_ci_pval_at_estimate_unavailable,..._rejects_at_estimate,..._bound_not_found) are now recorded underprocedure_failure_reason[["lik_ratio_bootstrap_ci"]], keeping the Wald estimate and standard error, as other resampling procedures do (v1.0.6-TODO-210).Tests: the slow-path-versus-reusable-worker checks on interval-censored survival data now skip a class whose general-censoring fit needs a Suggests package that is not installed (
intervalfor the Kaplan-Meier, RMST, log-rank and Gehan-Wilcoxon classes,icenRegfor Cox), so they no longer fail on the R-devel valgrind and ASAN/UBSAN checks, which install only hard dependencies. The Weibull slow-path and worker draws still agree (v1.0.6-TODO-180).PRW subsampling confidence intervals and p-values now respect the CI timeout deadline and re-raise timeouts or interrupts that occur while computing the original estimate, instead of returning
NA(v1.0.6-TODO-194).The g-computation risk-ratio classes now accept a list-valued
b/m(minimum-volatility size selection) for subsampling and m-out-of-n intervals and p-values; timeouts raised while computing their original estimate, or while the resample-size selectors evaluate a candidate, now abort the call instead of producingNAor a non-estimable candidate (v1.0.6-TODO-196).The zero-augmented and hurdle count kernels check their inputs;
y = numeric(0)and mismatched input lengths no longer crash R or return a converged-looking fit of garbage (v1.0.6-TODO-195).InferenceIncidRiskDiffrecords a class-specific non-estimability reason when one is set (v1.0.6-TODO-156).
Warnings instead of silent NA results
InferenceIncidExactFisher$compute_estimate()now warns (classedi_procedure_na_warning) when it returnsNAbecause an arm has no events and the conditional MLE is infinite, and names the cause; the exact CI and p-value are unchanged (v1.0.6-TODO-306).NAresults that EDI recorded on the object without a warning now warn with a classed warning carryingprocedureandreasonfields (edi_procedure_na_warning, oredi_unsupported_procedurewhen the procedure is unsupported): asymptotic inference for count-likelihood classes on blocked-cluster designs, bootstrap intervals rejected as numerically extreme, jackknife results that are not estimable, and jackknife or BCa results on blocking designs whose deletion unit is unsupported (the warning namesunit = "block") (v1.0.6-TODO-113, v1.0.6-TODO-108, v1.0.6-TODO-74).Randomization, bootstrap and Bayesian-bootstrap p-values that return
NA(too few finite draws or replicates, implausibly extreme replicates, or a BCa p-value that cannot be computed) now warn once with the reason (edi_procedure_na_warning). Randomization interval searches no longer repeat the p-value warning for everydeltathey try; the interval warns once if it endsNA. Values are unchanged (v1.0.6-TODO-136, v1.0.6-TODO-145).The randomization-bootstrap confidence interval now warns once (
edi_procedure_na_warning, with the reason) when it returnsNA: estimate or studentized SE unavailable, too few finite null draws, or a search-bounds, bisection or closed-form failure. An unavailable Bayesian-bootstrap BCa p-value now warns too (v1.0.6-TODO-165).The parametric-bootstrap LR p-value and CI, the parametric-bootstrap estimate, CI and p-value, and the m-out-of-n and subsampling p-values now warn (
edi_procedure_na_warning) when they returnNA(for example an LR-bootstrap CI withBtoo small to reach alpha). The resampling flag now covers only their replicate loops, so on a not-yet-fitted object parametric-bootstrap results can differ at about 1e-10 and now match the results on an already-fitted object (v1.0.6-TODO-207).The Bayesian-bootstrap
type = "wald"p-value now warns (edi_procedure_na_warning, reasonbayesian_bootstrap_standard_error_unavailable) when the draws have no spread. Resampling methods now restore an outer resampling operation on exit instead of clearing it, so nested calls no longer turn on warnings that should be silent (v1.0.6-TODO-185).The studentized (bootstrap-t) bootstrap and Bayesian-bootstrap p-values now warn (
edi_procedure_na_warning) when standard errors are missing or unstable, as the studentized interval already did; values are unchanged (v1.0.6-TODO-140).The BCa bootstrap interval and p-value (plain and Bayesian) now warn once per object with
edi_bootstrap_bca_unstable_warning(suggestingtype = "percentile") when they areNAbecause the BCa bias correction or acceleration is unstable (v1.0.6-TODO-116).A plain-bootstrap BCa interval that is
NAbecause the adjusted tail falls on the boundary now warns when some bootstrap draws were non-finite (for example a cluster resample with no treated or no control cluster). It was silentlyNA NAbefore, including onDesignFixedClusterwith 5 or more clusters. Finite intervals are unchanged (v1.0.6-TODO-162) (this also closes the nightly silent-NA gate failure, v1.0.6-TODO-182).When fewer than 10 randomization draws were requested, the randomization p-value’s
NAwarning (randomization_too_few_finite_estimates) now says to increaserinstead of blaming the estimator (v1.0.6-TODO-202).When a model’s fit with all covariates fails (for example a coefficient diverges under separation) and the hardened refit drops covariates, EDI now warns once per object (
edi_covariate_dropped_warning, fieldsdropped,reason,diverged), naming the dropped columns;InferenceIncidProbitRegrand the other GLM, g-computation, ordinal and survival classes used to report the reduced model silently. Columns dropped only for collinearity are still silent, and no estimates change (v1.0.6-TODO-138).InferenceIncidLogRegr,InferenceIncidProbitRegrand the logistic g-computation classes (InferenceIncidGCompRiskDiff/RiskRatio,InferenceIncidKKGCompRiskDiff/RiskRatio) now warn (edi_logistic_separation_warning, once per object, never inside resampling) when fitted probabilities are numerically 0 or 1, i.e. under (quasi-)complete separation. Estimates are unchanged (v1.0.6-TODO-109, v1.0.6-TODO-119).InferenceSurvivalKMDiffnow warns, naming the arm, when a Kaplan-Meier median is not reached (all results areNA; useInferenceSurvivalRestrictedMeanDiff); on left- or interval-censored data it warns (edi_km_median_not_reached_warning) when an arm’s Turnbull median is not reached, naming the arm and its lowest survival. A jackknife-WaldNAis explained by the median-specificedi_km_jackknife_na_warning(the jackknife is unreliable for medians; use the bootstrap) (v1.0.6-TODO-112, v1.0.6-TODO-144).
Documentation
Corrected docs from the 2026-11-21 docs-scenario audit:
?InferenceSuiteno longer points to unexported internals and saysmethods = NULLmeans every sentinel it lists;?Designand the reproducibility vignette date the per-subject sequential seeding to the first release after 1.0.4 (a development build still reports 1.0.4); the notation glossary saysSimulationFrameworkhooks receivewin {0, 1};?SimulationFrameworksays$run()returns the framework, not a report, and that errors are read withSimulationFrameworkReport$new(sim)$get_errors();?DesignFixedBlockingand the existing-experiment article say when the unequal-block error fires (at a drawn assignment, or for a suppliedwat the first redraw, bootstrap or randomization call), and the article says the four-site BCa interval is finite;?InferenceIncidWaldand?InferenceIncidRiskDiffno longer list other methods’ arguments under$new(); the proportional-odds, cloglog, ordered-probit and cauchit classes document their constructor, which takes nohardenorseed; the proportion cookbook says fractional logit fits exact 0s and 1s;?InferencePropBetaRegrstates the Smithson-Verkuilen squeeze it applies to every response when any is 0 or 1; and?InferenceOrdinalJonckheereTerpstraTestdescribes its exact algorithm (enumeration of per-category treated counts, capped at one million count vectors, not allocations) and its two-sided convention.?DesignFixedGreedyand?DesignFixedGreedyDOptimal: the two classes give the same draws at their defaults only when the covariates have no ties; with ties their searches can break equal-improvement swaps differently (v1.0.6-TODO-295).The
InferenceIncidBinomialIdentityRiskDiffexample no longer triggers the boundary warning (v1.0.6-TODO-332). Further documentation fixes from the reference-page (Rd) audit.Corrected docs from the docs-scenario audit:
?DesignFixedBlockedClustersays blocks may have unequal sizes and which jackknife units returnNAthere, and why;InferenceIncidLogRegr(estimand = "marginal_ratio", log scale) andInferenceIncidGCompRiskRatio(ratio scale) state the scale of the same marginal risk ratio;InferenceSurvivalRestrictedMeanDiffno longer names a nonexistentDesignFixedBCRD; the missing-covariates article says the outcome-free imputation ships after the 1.0.4 release;InferenceRandCustomdocuments that C++ source must be a single function without// [[Rcpp::export]], that a nonzerodeltaand the randomization CI are coherent only for continuous responses (on survival the CI is returned but not valid), and the article quotes the real two-argument error, the 2/B p-value floor and the one-number check; the randomization methods document the allowedtransform_responsesvalues and thepermutationslist format; the Python article now says the kernels check thatwis 0/1; and the Cox kernels’ stubs and README say ties use Breslow’s approximation.Corrected documentation claims:
SimulationFrameworkdraws covariates withcov_draw_method(defaultstats::rnorm), not Uniform(0, 1);InferenceSurvivalRestrictedMeanDiffintegrates the Kaplan-Meier curve exactly (a sum of rectangles), not by the trapezoid rule; andfast_cpoisson_combined_with_var_cpp()documents itstol,hessianand estimate-only return accurately.Corrected more class documentation that contradicted the code: the incidence classes’
compute_rand_two_sided_pval()takes its default p-value from randomization draws and uses the Zhang exact test only withtype = "Zhang";InferenceIncidKKNewcombeRiskDiffuses Wald variances in both components;InferencePropQuantileRegr’s weighted refit no longer claims to overwrite the cached estimate;InferencePropZeroOneInflatedBetaRegr’s weighted refit is described as the separate weighted fits it runs;InferenceOrdinalPairedSignTestsupports bootstrap and jackknife; andInferenceOrdinalStereotypeLogitRegrlists only its Bartlett p-value as excluded from the comprehensive suite.InferenceCountZeroInflatedPoissondocuments that at small n with continuous covariates in the zero-inflation formula the ZIP MLE often does not exist (a separated zero-part ridge): some fits can stop at a lower interior local maximum without a warning, and the count-part estimate is only weakly defined on a ridge. A treatment-only zero formula (model_formula_zero = ~ 1) is recommended there (v1.0.6-TODO-232).The jackknife documentation explains why the stratified jackknife rescales EDI’s subset refits to Wolter’s reweighted replicates, and that its bias correction then equals the ordinary jackknife bias, which can over-correct nonlinear estimators when strata differ strongly (v1.0.6-TODO-231).
Filled documentation gaps the docs-scenario audits noted outside their findings (v1.0.6-TODO-404).
?SimulationFramework:X_matmakescov_draw_methodignored (it need not beNULL),keep_all_intermediate_datais refused withnum_cores > 1orNrep_Y_w > 1, and incidence and proportion responses puty_linear_modelandbetaTon the logit scale;SimulationFrameworkReport$get_results()explains thesimulation_modecolumn.compute_rand_two_sided_pval()lists its onlytype,"Zhang", and itsargs_for_type; the exact Fisher, binomial and Zhang classes document theircompute_exact_*()methods, including that the Fisher and binomial exact intervals ignorepval_epsilon.?DesignFixedRerandomizationexplains how to chooseobj_val_cutofffor a target acceptance rate;?DesignFixedBlockedClusterdocumentsset_m();set_optimization_alg()lists its accepted values; the matching designs documentget_matching_cluster_ids(); and the count cookbook and extending-EDI vignettes link to the roadmap and contributor contract on GitHub instead of files the package does not ship.
Internal
PRW subsampling and the m-out-of-n bootstrap share one setup routine (v1.0.6-TODO-194).
InferenceCountZeroInflatedNegBinloses a marginal-estimand branch that could never run.fast_gaussian_lmm.cppno longer triggers a false-Warray-boundswarning under GCC 16 at-O3, whichR CMD checkreported as a significant install warning on CRAN’s gcc16 check. Results are unchanged (v1.0.6-TODO-426).
EDI 1.0.4
Correctness release. Wrong results found by the algorithm audit and the comprehensive-test sweeps are fixed, and seeded draws are now identical on Linux, macOS and Windows at every thread count (checked in CI). No new methods.
Breaking changes
The randomization bootstrap (
compute_rand_bootstrap_two_sided_pval(),compute_rand_bootstrap_confidence_interval(),approximate_rand_bootstrap_distribution_beta_hat_T()and theget_supported_rand_bootstrap_*_types()helpers) is no longer available onDesignSeqOneByOnedesigns other thanDesignSeqOneByOneBernoulli, matching the nonparametric bootstrap. It resamples subjects the same way, and its validity on adaptive sequential designs, including the KK designs, is unproven. Those methods now stop with “not supported”, andsupports()reportsrandomization_bootstrapandrandomization_bootstrap_ciasFALSEthere. Before,supports()reported them available, contradicting the capability contract. KK estimators keep the randomization bootstrap onDesignFixedBinaryMatch.InferenceIncidKKCondLogitGLMMOneLikandInferenceIncidKKCondLogitGLMMIVWCfit a new model: conditional logit on the discordant pairs, plus (OneLik only) a logistic regression on the reservoir with shared coefficients. The old GLMM split most pairs into one-row groups. All results change; class names are unchanged andmax_abs_log_sigmais ignored. OneLik’s pooled estimand caveat is documented in the class.InferencePropKKGLMMkeeps its GLMM, now grouped correctly.GitHub source installs build the portable CRAN configuration by default;
EDI_PORTABLE=0restores the machine-tuned build.Randomization p-values (and their Monte Carlo bands) count a redrawn statistic within 1e-8 (relative) of the observed one as a tie in both tails. A redraw that reproduces the observed allocation gives the observed statistic only up to rounding, so before it could be counted or not depending on the build and core count (seeded 1-core and 2-core sessions could differ by 2/r). P-values with such ties can rise by up to 2/r.
Seed-pinned draws change once: a portable shuffle replaces
std::shuffle, and greedy, D-optimal, pair-switching and rerandomization designs no longer depend on the thread count.DesignSeqOneByOnePocockSimonno longer rebuilds the model matrix on every arrival. When covariates have missing values, that rebuild ran the random-forest imputation, which drew from R’s random number stream, so seeded assignment sequences with missing covariates change once. Sequences without missing covariates are unchanged.DesignFixedBlocking,DesignFixedOptimalBlocks,DesignFixedClusterandDesignFixedBlockedClusterdraw null assignments in one vectorized pass (about 15x faster, norandomizrneeded, independent ofset_num_cores()), so seeded draws change once. Singleton blocks are Bernoulli(prob_T).Studentized bootstrap statistics are cached per object by
Bandsmoothand useset_seed(), so a studentized CI and p-value share resamples. Seeded results change once.Randomization p-values and intervals use
set_seed(), else the design seed, and the permutation cache is keyed on that seed. Seeded results change once; unseeded behaviour is unchanged. Newclear_randomization_cache().The KK matched-pair bootstrap,
InferencePropGCompMeanDiff’s bootstrap, the"calibrated","double-bootstrap"and"prepivoted"bootstrap CIs and the KK quantile-regression IVWC randomization CI now use the object’s seed instead of the caller’s RNG stream. Seeded results change once.compute_rand_confidence_interval()errors instead of returning wrong-scale bounds for raw-scale mean-difference and rank classes on proportion, count and ordinal responses (e.g.InferenceAllSimpleAverageDiff,InferenceOrdinalRidit).capabilities()/supports()no longer advertiserandomization_ciwhere it is refused, soInferenceSuiteandSimulationFrameworkskip it.On cluster designs
InferenceContinOLSandInferenceContinLinuse a CR2 cluster-robust SE with Satterthwaite degrees of freedom (asclubSandwich), andcluster_colno longer enters~ .. Other regression classes warn once (edi_cluster_independence_warning); use randomization, bootstrap or cluster jackknife inference there.Randomization intervals invert at
alpha, notalpha / 2(they were too wide); the defaultpval_epsilondrops from 0.005 to 1e-6.Binary matching minimizes plain distance by default, as
nbpMatchingdoes (about 22% of pairs change);match_objective = "squared_distance"restores the old pairs.KK21 survival weights come from a correct Weibull AFT fit.
InferenceSurvivalRestrictedMeanDifftruncates both arms at one horizon; the interval-censored path now uses exact events, and an all-censored arm’s RMST is the horizon, notNA.The bootstrap CI width guard is
5 * max(1, sd(y)), so wide intervals on large-scale outcomes are no longer returned asNA.get_summary()works for every class and returns its table invisibly.Design$any_censoring()isFALSEbefore responses are recorded, soapplicable_inference_class_names()no longer drops classes early.DesignFixedOptimalbootstrap replays reuse the observed solver.Jackknife inference is centred on the jackknife estimate.
compute_rand_two_sided_pval()always uses randomization draws; for incidence it no longer silently returns the more conservative Zhang test (still available astype = "Zhang").Methods that cannot give a valid answer now error: KK modified Poisson is Wald-only, smoothed randomization bootstrap is refused for categorical and bounded refits, exact tests refuse bootstrap weights, and
InferenceOrdinalKKCondAdjCatLogitRegrdrops the Bayesian bootstrap.InferenceSurvivalDepCensTransformRegr’s bootstrap intervals default toB = 501like every other bootstrap; passB = 1000for the old ones.DesignFixedBlocking:strata_colswithoutB_targetuses all named strata (the default cap dropped them silently).Blocking designs treat an integer-valued strata column with at most 10 distinct values as categorical instead of binning it.
prob_Tis removed from the constructors of designs that always assign 1:1 (Efron, Atkinson, Pocock-Simon, the KK sequential designs,DesignFixedBinaryMatch,DesignFixedMatchingGreedyPairSwitching); passing it is now an error.InferenceCountZeroInflatedPoissonandInferenceCountZeroInflatedNegBinerror when the response has no zeros (not identified, as inpscl::zeroinfl()); resampling replicates with no zeros fall back to the non-inflated fit.Unequal-arm support is a design registry capability,
supports_unequal_allocation, checked at construction.
New features
-
DesignSeqOneByOneKK21stepwise:condition_on_ws_for_rand_tests = FALSEreplays the full allocation in randomization tests. - KK quantile-regression randomization intervals are re-enabled.
- Studentized Bayesian-bootstrap intervals for the Weibull and modified-Poisson classes.
-
na.rmfor the KMDiff Bayesian-bootstrap p-value. -
InferenceSurvivalRestrictedMeanDiff$new(..., tau = NULL): a user-set RMST horizon. -
alternative = c("two.sided", "greater", "less")oncompute_rand_two_sided_pval(), for non-negative custom statistics. -
clear_randomization_cache()onInference. -
run_all_inference()results gain four columns afterweight:regime(asymptotic or finite-sample),n_eff(the effective-sample-size rule for the class, design and procedure with its value on your data, e.g.n_pairs = 25),size_order(expected order of the size / coverage error, e.g.O(n_eff^-1),exact,O(1)orunknown) andrate_basis(theory, literature, assumed default or unknown). Existing columns are unchanged. -
get_inference_procedure_validity(design, inference_class, procedure = NULL)and the inference methodget_procedure_validity(procedure = NULL)look up, without fitting, what the validity registry says about each procedure a class supports: regime, expected order of the size error, effective-n rule (with its value on the object’s data for the method), regularity, basis and reference. Measured calibration values are not shipped yet (measuredisNULL).
Bug fixes
tune_EDI_for_this_machine()no longer refuses to run on an idle machine with “calibration timings are noisy”. Its idle check timed a single ~1 ms operation with a 1 ms clock, so the measured spread was mostly the clock’s rounding. Each calibration sample now times a batch of 50 runs.tune_EDI_for_this_machine()no longer loses a finished run when it cannot write its config file (for example a read-only home directory). It now warns, applies the tuning to the current session, and returns the result.tune_EDI_for_this_machine()’s summary now gives the right number of timing wins discarded by the correctness gate. It counted warm-start operations instead (5 printed for 19 discards).tune_EDI_for_this_machine()’s start-up time estimate now matches measured runs: about 1 hour foreffort = "quick"and 3-4 hours for"standard"on a 6-core laptop (it said 2-5 and 15-30 minutes)."thorough"is not timed and takes many hours.tune_EDI_for_this_machine()no longer aborts partway through (it stopped at cell 57 of 1065 undereffort = "standard"). Its synthetic count data had no zeros, which the zero-inflated classes now reject. Zero-inflated and hurdle classes are now benchmarked on counts that include structural zeros. A benchmark cell that still errors is skipped with a warning and keeps the shipped default; skipped cells are listed inattr(x, "failed_cells").InferenceIncidLogBinomial’s gradient CI now warns (classedi_lik_ci_lik_ratio_fallback) and records why when it returns the likelihood-ratio interval because gradient inversion failed; this was silent.InferenceSurvivalDepCensTransformRegrfits from several deterministic starts and keeps the best, since the single start could miss the MLE (about 1 fit in 7). Fits take about 2x as long.InferenceSurvivalKMDiff’s Wald CI and p-value keep each arm’s asymmetric median interval (MOVER); coverage with small arms improves. Results change for every dataset.Likelihood-ratio CIs no longer return a bracket midpoint when the root search hits its iteration limit.
BCa bootstrap intervals count ties with the estimate as half, so discrete bootstrap distributions no longer make them mostly
NA.InferenceSurvivalKMDiffand the quantile-regression classes default to the percentile bootstrap;type = "bca"is still available.InferenceSurvivalRestrictedMeanDiff’s randomization-bootstrap CI is refused: its bounds were on the wrong scale.Randomization-bootstrap replays redraw each resample’s assignment from the resample’s own design structure (pairs, optimal blocks, D-optimal and rerandomization criteria). Results on these designs change, and replays with
DesignFixedOptimalBlocks(method = "ompr")are very slow.DesignFixedOptimalBlocks(method = "greedy")no longer fails on some resamples with duplicated rows.InferenceSurvivalRestrictedMeanDiff’s Bayesian-bootstrap studentized intervals are no longer alwaysNA.Robust regression classes return
NA, not 0, for fits with non-finite data.robust_survreg()restart jitter uses its own seeded stream (newjitter_seedargument) and leaves the caller’s RNG alone.InferenceSurvivalKKRankRegrIVWCresults are now reproducible across calls.InferenceAllKKMeanDiffIVWC’s bootstrap no longer errors onDesignFixedBinaryMatch.Ridit
reference = "treatment"always returned 0; interior levels misscored.InferenceOrdinalRidituses the DeLong SE; the old one was anti-conservative.compute_rand_confidence_interval()refuses proportions with exact 0 or 1 for logit-shift classes, and survival responses for raw-scale classes.The jackknife block-size guard no longer swallows interrupts and timeouts.
InferenceRandCustomrandomization CIs are searched on the effect scale.InferenceOrdinalPartialProportionalOddsRegr(VGAM) had the wrong treatment sign, andnonparallelgave degenerate fits.Ordinal fast solvers centre and scale covariates, fixing wrong estimates for covariates far from zero.
InferenceContinLinno longer reuses another formula’s centred covariates.InferenceSurvivalKKStratCoxPHOneLik’s Bayesian-bootstrap refit uses the same reservoir stratum;InferenceSurvivalStratCoxPHRegrwarns on matched designs.KK and frailty survival classes work with zero covariate columns.
Score / LR / gradient tests of the KK OneLik and GLMM classes work when
beta_Tis the only parameter, and several classes that silently returned Wald results now run the requested test.InferenceCountKKGLMM’s score test sign is fixed.New classed warnings when a likelihood test is unavailable or replaced by Wald (
edi_lik_test_unavailable_warning,edi_lik_ci_wald_fallback,edi_lik_test_wald_fallback,edi_unsupported_procedure).A failed resampling or likelihood-test procedure returns
NAfor that procedure only, without marking the object non-estimable.InferenceIncidLogBinomialandInferenceIncidBinomialIdentityRiskDiffwarn once (edi_binomial_mle_boundary_warning) when the MLE is on the boundary.InferenceIncidLogBinomial’s Wald p-value and CI are nowNAwhen the MLE is on the boundary (a fitted probability of 1), with a warning (classedi_wald_mle_boundary_unavailable) pointing to the likelihood-ratio test. The Wald standard error is too small there: null size was 0.14 at n = 50 with five covariates, and is 0.04-0.05 over the fits that remain. With several covariates most fits are on the boundary, so Wald is oftenNA. The likelihood-ratio interval at such fits no longer falls back to the Wald interval when the null refit had no feasible start (526 to 75 of 1000 fits at n = 50).InferenceIncidLogBinomialandInferenceIncidBinomialIdentityRiskDifffits no longer stop short of the MLE at a boundary, which also made the jackknife depend on call order.InferenceIncidProbitRegrno longer reports convergence at a saturated fit.InferenceIncidBinomialIdentityRiskDiffno longer cycles until the iteration cap on some interior fits.InferenceIncidBinomialIdentityRiskDiffandInferenceIncidLogBinomial: one failed null refit no longer makes every later likelihood test on the objectNA. The retry is shared by all likelihood-test classes.InferenceIncidLogBinomialandInferenceIncidBinomialIdentityRiskDiff: score and gradient tests at a null MLE with a fitted probability of 0 or 1 wereNAor wrong; they now use the profile (Kuhn-Tucker) score, so their intervals end at true roots.InferenceIncidBinomialIdentityRiskDiff’s null refit no longer fails when every start has a fitted probability outside [0, 1]; such CI endpoints stopped short of the root.InferenceOrdinalStereotypeLogitRegr: likelihood-test p-values no longer depend on which nulls were tested earlier on the object (now 3-6x slower).InferenceOrdinalStereotypeLogitRegr: the randomization and bootstrap estimator now matchescompute_estimate().InferenceCountNegBinfits now matchMASS::glm.nb.Modified Poisson Wald SE is the robust sandwich.
Randomization intervals reused a shifted null that is exact only for mean-difference and OLS estimators, and refined the wrong endpoint.
InferenceAllKKWilcoxIVWCSEs, bootstrap interval and bootstrap scale; other legacy*IVWCclasses had placeholder variances or dropped pairs.Mixed models: logistic GLMM Hessian, multi-start fits, KK GEE correlation, bootstrap-weighted refits that fit the wrong model.
Ordinal: cloglog parametric-bootstrap sign (left open in 1.0.2), stereotype and continuation-ratio multi-start; ZOIB softmax means.
Designs:
RandomBlockSizeredraw stratum and single block size,PocockSimonNAlevel,OptimalBlocksblock-size spread.Incidence: Newcombe root search, equal-tailed exact-binomial p-value, Zhang interval bracket.
Survival: stratified-Cox bootstrap scaling, DepCens intervals, Clayton overflow, KK Weibull no-event
NA, Breslow ties in Cox fallbacks.Stale caches keyed on
wonly (GLM, Cox, log-rank, Gehan);get_X_imp()aliased the raw covariates.InferenceAllSimpleAverageDiffbootstrap weights are frequency weights.Singular fits return
NASEs; Jonckheere-Terpstra exact enumeration is capped at 1e6 cells.Crashes: GC faults in the KK21 ordinal and match kernels;
InferenceRandCustomcompile cache.InferenceOrdinalKKCLMMCloglog’sordinal::clmm()paths fitted the log-log model (aclmm()link-name swap); EDI now detects the mapping.KK CLMM classes no longer report convergence at non-stationary fits; such fits are retried, else
NA.InferenceBaiAdjustedTKK14/KK21: the asymptotic p-value now testsdelta(it ignored it).InferenceContinKKGLMM’s score intervals were about 20% too narrow; fixed.InferenceCountZeroInflatedPoisson/ZeroInflatedNegBin: LR and score intervals no longer contradict their tests, and the ZINB Wald SE is no longerNAat a boundary.InferenceAllSimpleWilcox’s asymptotic p-value at nonzerodeltatested-delta; it now matcheswilcox.test(mu = delta).InferenceCountKKGLMMreports the model-based likelihood tests instead of the larger of model and Wald p-values.InferenceOrdinalStereotypeLogitRegrno longer drops covariates in most fits. With 3+ categories a treatment-only fit (~ 1) is non-estimable: the model is saturated there and its tests are not calibrated.InferenceCountHurdleNegBinandInferenceSurvivalDepCensTransformRegrlikelihood-test p-values no longer depend on call history.
Known limitations
-
InferenceSurvivalRestrictedMeanDiff’s SE assumes independent arms, so it is conservative on designs other than Bernoulli and complete randomization. Design-aware variances are planned for 1.1.0. -
InferenceSurvivalKKStratCoxPHOneLikwith covariates is biased toward zero at small n, so its intervals under-cover; useInferenceSurvivalKKLWACoxPHOneLik. A fix is planned for 1.1.0. - Jackknife inference on
DesignSeqOneByOneSPBRandDesignFixedBlockingwith few strata under-covers (about 0.85); a fix is planned for 1.1.0. -
InferenceOrdinalCloglogRegrwith covariates at small n: likelihood-based tests reject 8-12% at nominal 5%, and the parametric bootstrap is conservative. Under review for 1.1.0. -
InferenceIncidExtendedRobins’s Wald test is anti-conservative on small blocks and matched pairs; useInferenceIncidCMHthere. - Some asymptotic tests reject up to 8-14% at nominal 5% at n = 50, or with about 10 treated subjects; they are close to nominal by n = 200. Each affected class’s help page has a “Small samples” note naming the tests and a better-calibrated alternative. Under review for 1.1.0.
Performance
- The tighter KK CLMM tolerance makes full fits about 1.5x and randomization refits about 2.8x slower.
- Cached per-permutation slopes, a C++ OLS randomization kernel, batched Bayesian-bootstrap weights, lazy model matrices; OpenMP kernels respect the package thread maximum.
- Eight unused internal C++ kernels were removed.
Documentation
- New vignette “Which procedure can I trust at my sample size?” (
vignette("procedure-trust")). It explains the split between finite-sample procedures (exact tests and the randomization test) and asymptotic ones, the order of the size error and the effective-n rule of each procedure, the classes where the rate is unknown and why (boundary, variance components, zero inflation, quantile-regression sparsity, design mismatch), and how many design x class x procedure cells rest on theory, an assumed default, or nothing. Its tables are rendered from the internal registry, and a test fails if they drift from it. It links the published calibration results. - Every public inference class’s help page has a new “Small-sample behaviour” section generated from the same registry: for each procedure the class supports it gives the regime (exact or asymptotic), the order of the size error, the effective-n rule, the regularity and the references, with design-specific differences (unequal allocation, cluster designs, designs that make an unadjusted variance conservative). A rate that is only the procedure’s regular-model default is labelled “assumed default”, and an unknown rate says so rather than guessing. The new citations are in
REFERENCES.md. The hand-written small-sample paragraphs now quote the first calibration campaign: for example theInferenceContinLinWald test atprob_T = 0.2, n = 50 with covariates rejected 17% of the time, not the “about 10.5%” stated before.
Internal
- Inference components declare only the components they call; shared resampling helpers moved into a new internal
ResamplingCorecomponent. - New internal registry
inference_procedure_regime.Rclassifies eachrun_all_inference()procedure as asymptotic or finite-sample (exact and randomization); package load fails if a procedure has no entry. The published calibration study uses it to hold asymptotic procedures to a looser size and coverage tolerance at small n. - The same file now holds an internal convergence-rate registry: for each design, inference class and procedure it records the order of the size / coverage error and of the bias, the effective sample size (pairs, smaller arm, events, nonzero counts, …), the regularity of the model, and whether the answer comes from theory, the literature, or is only a default or unknown. Rates not known are recorded as unknown, never guessed. Nothing in the calibration gate reads it yet.
EDI 1.0.2
CRAN release: 2026-10-07
This is the first version submitted to CRAN. Versions 1.0.0 and 1.0.1 were GitHub-only releases; their entries below record what changed in each. Most of 1.0.2 is correctness work found by the extended comprehensive test suite and by writing unit tests: resampling and randomization results that were silently wrong in specific classes, a few kernel defects (including one memory-safety bug), and standard-error and confidence-interval fixes.
Breaking changes
-
toggle_asserts(),set_num_cores(), and the internal thread-count bookkeeping it drives no longer set globaloptions()as a side effect (CRAN policy: a package must not modify and leave changed the user’s session options).toggle_asserts()now stores its flag in the package’s own internal state; calling it no longer changes whatgetOption("edi.run_asserts")returns (a user’s ownoptions(edi.run_asserts = ...)is still read and honored). Likewise,set_num_cores()/set_package_threads()no longer setoptions(mc.cores = ...)(nothing in EDI read it back; downstream code relying on this package to set it forparallel/pbmcapplyneeds to set it itself now) and no longer callfixest::setFixest_nthreads()(which setsoptions(fixest_nthreads), the user’s own option, not EDI’s to change). No change to which thread counts are actually used internally — only to these previously-observableoptions()side effects.
New features
-
InferenceCountQuasiPoissonnow composes the marginal-estimand component (MarginalEstimand), likeInferenceCountPoisson, so marginal (standardized) effect estimands are available for the quasi-Poisson class as well.
Bug fixes
Reused-worker resampling reused a stale cached fit across draws for classes whose fit is cached under a custom guard key (first found in
InferenceOrdinalGCompMeanDiff, whosecached_values$mdguard survived the loader’s narrow reset list). Every draw then returned the same number, the resampling distribution collapsed to a point mass, andcompute_rand_two_sided_pval()sat at its floor regardless of the true effect (reject rate 1.0 at a true null). The worker loaders for randomization, non-parametric bootstrap, m-out-of-n bootstrap and randomization-bootstrap draws now reset the cached fit state between draws, and a structural regression test asserts that every class exposing a reusable-worker method returns a non-degenerate distribution.InferencePropGCompMeanDiffandInferenceSurvivalGLMMWeibullFrailtyLoggammaIVWCreturnedNA(or a stale value) in randomization inference: the first from a sample-usability gate applied to the wrong resampling context, the second from its estimate-onlyw_starpooling. Both are fixed and no longer listed as known-broken.The KK survival compound classes
InferenceSurvivalKKLWACoxPHOneLik,InferenceSurvivalGLMMWeibullFrailtyLoggammaOneLikandInferenceSurvivalGLMMWeibullFrailtyLoggammaIVWCfed realNAs into the fitter for every censored subject during randomization inference:compute_treatment_estimate_during_randomization_inference()re-readyfrom the design and deriveddead = as.numeric(!is.na(y)), but since they/y_L/y_Rmigration the design’syusesNAto mark a censored observation. On simulated data with a strong effect the randomizationp-value was 0.02 with no censoring and 0.97 with about 20% censoring.y/deadare now derived asDesign$get_effective_time()/$get_effective_dead()do. A sweep of the other 16 survival classes found no further instance.InferenceOrdinalCloglogRegr’s parametric-bootstrapp-value was badly over-rejecting (60% at a true null). One cause is fixed: the delta-constrained null refit started from a single cold start and could stall; it is now multi-start (the same fixInferenceOrdinalStereotypeLogitRegrreceived earlier). A second cause, a sign mismatch in the shared bootstrap-data simulator, is root-caused but not fixed here.The Efron biased-coin randomization null draws (
generate_permutations) compared weighted arm counts (n_T * prob_Tvsn_C * (1 - prob_T)) instead of the raw arm countsDesignSeqOneByOneEfronactually compares, so for anyprob_T != 0.5the randomization null did not follow the design’s own assignment rule. It now uses the raw counts.fast_probit_regression’s L-BFGS objective held a danglingEigen::Refto a temporary, giving non-deterministic fits andNaNnegative log-likelihoods. The objective now owns its design matrix.fast_log_binomial_regression’s weighted log-likelihood let zero-weight rows constrain the[0, 1]mean support although they are absent from the likelihood; zero-weight rows are now skipped, so the identity- and log-link binomial fits no longer reject valid data because of them.The robust-regression bootstrap kernel accepted any
methodstring and would throw inside an OpenMP region, terminating R;methodis now validated ("M"or"MM") before the parallel region.stable_signature()(used to key cached randomization state) hashed a strided sample of the serialized object, which collided on 0/1 integer permutation matrices; it now hashes the full serialization.InferenceCountPoisson’s covariance falls back to the Fisher information when the kernel returns noX'WX;InferenceIncidLogRegrgained an estimand-aware standard error and degrees of freedom.Weibull and Cox fits with fixed (held) coefficients now compute the covariance from the free-parameter information block only and expand it back, so the free coefficients’ variances are finite and the fixed parameters’ rows and columns are
NaNby convention; the Cox cluster-robust sandwich does the same.OpenMP’s primary thread no longer polls R’s interrupt machinery while worker threads are active in the Wilcoxon-Hodges-Lehmann kernels.
fast_gaussian_lmm_gls_cpp()(the fixed-variance-component GLS solve used by the randomization and non-studentised bootstrap fast paths ofInferenceContinKKGLMM) mixedX'Xwith a cross-term scaled by an extra1/sigma_e^2, so it returned the wrong coefficient whenever the residual standard deviation was not exactly 1 (on a paired-plus-singleton fixture withsigma_e = 0.4the slope was -0.53 instead of the correct 0.63; atsigma_e = 1the two agreed). It now matches an explicit GLS to machine precision at everysigma_e.The KK21 stepwise weight selection for ordinal responses read a nonexistent field (
ssq_b_2) fromfast_ordinal_regression_with_var_cpp(); it now reads the returnedssq_b_j.Native fitting kernels now validate the dimensions of consumed caller-supplied warm-start parameter, weight, and Fisher-information inputs, and validate fixed-parameter indices before use. Malformed inputs that could previously trigger unsafe Eigen indexing or silently discard a supplied start now fail at the native boundary with an error.
fast_zero_one_inflated_beta_cpp()did not check the length of a suppliedwarm_start_params(orwarm_start_fisher_info, or the row counts ofX,X_zero_oneandy), so a mis-sized start let the optimizer read and write past its parameter buffer (heap corruption, found under valgrind; it aborted R withfree(): invalid next size). It now raises an ordinary error.InferencePropZeroOneInflatedBetaRegralways passed a correctly sized start and was not affected.fast_ordinal_clmmnow errors on mismatchedX/y/group_idlengths instead of reading out of bounds.InferenceIncidRiskDiff,InferenceCountRobustPoisson, and the zero-inflated/hurdle Poisson classes reported a confident (often zero-width) confidence interval andp-value on a perfectly or near-perfectly fit response (e.g.yfully separated byw, or constant), because the Huber-White/model-based standard error collapses to a numerically-zero-but-positive value there. Found via a rawcomprehensive_testsresults audit’s new adversarial-data/fault-injection sweep.robust_sandwich_variance()and the affected classes’ standard-error paths now treat a variance below.Machine$double.epsas non-estimable (NA), not as precision.InferenceCountHurdlePoisson/InferenceCountZeroInflatedPoissonreported a confident estimate andp-value on a hurdle fit that has no MLE by construction (every positive count equal to 1, so the zero-truncated Poisson likelihood only improves aslambda -> 0). Non-estimability is now decided from the data alone (not from what the optimizer/glmmTMB happens to return), so the result isNAon every platform.InferenceRandCustom$compute_rand_confidence_interval()’s fast path ignored the trialdeltashift during the randomization search, so the returned interval was in the custom statistic’s own scale (e.g. centred on a Welch-t value of ~2-4) rather than the response’s scale. Thecomprehensive_testsharness’s own custom-statistic randomization-CI check also fed it a non-translation-equivariant statistic (Welch t), which cannot give a meaningful CI under this or any correct implementation; it now uses a difference-in-means statistic for that check.InferenceAllSimpleWilcox$compute_asymp_confidence_interval(alpha)cached and returned the 95% Wilcoxon interval for everyalpha, so a 90% or 99% interval silently came back at the wrong nominal level.InferenceOrdinalAdjCatLogitRegr’s parametric-bootstrap confidence interval could be wildly wrong (e.g.[-30, -11]around an estimate of-0.09) because each simulated replicate’s treatment coefficient was read from the wrong field of the refit object (fit$b, slopes only) when the anchor fit’s index into its own coefficient vector (fit$params, thresholds + slopes) pointed somewhere else entirely onfit$b. Every parametric-bootstrap replicate now reads the same field the anchor fit used.InferenceOrdinalContRatioRegr(and, via the same hardened QR-column-dropping helper, 8 other ordinal threshold-model classes) could silently fit from a garbage cold start and “converge” after one iteration when the design matrix contained columns collinear with the model’s implicit per-stage intercept (e.g. a stratified design’s two complementary factor dummies) —qr()alone, with no intercept column to check against, reported the matrix as full rank. The column-dropping helper now optionally includes that implicit intercept in its rank check.A likelihood-ratio confidence interval whose Newton/bisection inversion converges to within a small tolerance of the point estimate — without landing on it exactly — was reported as a zero-width interval instead of falling back to the Wald interval (or
NA), because the “failed inversion” sentinel check required bit-identical bounds.InferenceOrdinalStereotypeLogitRegr’scompute_lik_ratio_confidence_interval()hit this on ~6% of one audited sample. Itscompute_lik_ratio_bootstrap_confidence_interval()had a related bug: a bootstrapp-value belowalphaat the point estimate itself (which should be ~1, since the LR statistic there is 0) was silently treated as a legitimate zero-width interval rather than a failed constrained-fit refit; it now reportsNA.compute_rand_bootstrap_confidence_interval(type = "smoothed")andcompute_rand_bootstrap_two_sided_pval(type = "smoothed")added raw-scale Gaussian kernel noise to count responses, so a resampled zero could become a slightly negative non-integer. Under the CI inversion’s multiplicative count shift that became a large negative integer, the Rcpp Poisson-GLMM fit gave up, and the glmmTMB fallback rejected every such draw (GLMM FIT ERROR: negative values not allowed for the 'Poisson' family), corrupting the null distribution and yielding a degenerate conservative bound (e.g.InferenceCountKKGLMM). Withuse_rcpp = FALSEevery draw failed and the p-value wasNA. Kernel noise on count responses is now rounded and floored at zero so the resampled draw stays on the non-negative integer support (the same convention the count shift already uses); other response types are unchanged.InferenceCountHurdlePoisson/InferenceCountHurdleNegBin/InferenceCountZeroInflatedPoisson/InferenceCountZeroInflatedNegBin’s standard error could fall through to the generic information-matrix-inverse fallback on a hurdle fit with no MLE by construction (every positive count equal to 1), and whether that generic inversion happened to return a spurious finite value or correctly fail depended on the LAPACK/BLAS backend (confirmed via CI to differ between this environment, where it correctly returned non-estimable, and Windows). The data-driven non-estimability check that already gated the estimate andp-value now also runs before this generic fallback, so the standard error isNAon every platform.SimulationFramework’s internal design/inference-combination builder unconditionally disabled package assertions and never restored them; a caller running withturn_off_asserts_for_speed = FALSE(assertions intentionally kept on) had assertions silently disabled for the rest of the R session after this method ran once, which could mask unrelated argument-validation bugs in later, unrelated code in the same session. It now restores whatever assert state was in effect on entry.
EDI 1.0.1
Breaking changes
-
set_custom_randomization_statistic_function()andset_custom_randomization_statistic_cpp()are removed from every concrete estimator class. They let a bare R closure readprivate$des_obj_priv_intthrough a hand-built environment proxy — an undocumented, fragile mechanism that also forced every concrete estimator’s own fast/vectorized randomization-test paths to carry a guard for a feature that had nothing to do with that estimator. Use the newInferenceRandCustomclass instead:InferenceRandCustom$new(des_obj, custom_randomization_statistic_function = function(y, w, dead) ...)(orcustom_randomization_statistic_cpp =for the same C++ source/compiled-function/RcppXPtrUtils::cppXPtr()options as before), then callcompute_rand_two_sided_pval()orcompute_rand_confidence_interval()on it. The statistic function’s calling convention is now explicit arguments —function(y, w, dead)— not implicit access to private state; existing custom statistic functions need this small rewrite.InferenceRandCustomhas its own dedicated fast kernel, so performance is unchanged or better than before, uniformly across every dataset and design (previously, speed depended on which concrete class the statistic happened to be attached to).
New features
-
InferenceIncidGCompRiskRatioandInferenceIncidKKGCompRiskRatiogain subsampling and m-out-of-n bootstrap confidence intervals and two-sided p-values (previously only available for the risk-difference gcomp classes). The risk-ratio pivot is computed on the log scale (null atlog(delta), centered onlog(estimate)), matching the convention already used by their percentile/BCa bootstrap CIs, since the raw-scale pivot correct for a difference is not correct for a ratio whose null is 1 and which is right-skewed at reduced effective sample size. -
get_local_EDI_optimization()’s hardware fingerprint now detects CPU/RAM on Windows and macOS as well as Linux.
Bug fixes
- The randomization confidence interval’s bisection search picked the wrong “conservative” fallback endpoint when it had no reliable sign change to bracket: it always fell back to the lower endpoint
lwhenever the lower p-value was non-significant, which is correct when searching for a lower bound (lis the outer/conservative end there) but wrong when searching for an upper bound, wherelis the point estimate itself and is essentially always non-significant. Every such “conservative” upper bound silently collapsed to the point estimate, producing badly-too-narrow intervals — confirmed by simulation at roughly 51-61% empirical coverage instead of the nominal 95% forInferenceContinLin,InferenceContinOLS,InferenceContinQuantileRegr, and the KK one-likelihood classes. The fallback now keys on which bound is being computed rather than which p-value was non-significant. -
SurvivalDepCensTransformSource(the dependent-censoring AFT residual transform) protected only the treatment column from the hardened QR column-dropping fallback, not the intercept — dropping the intercept left a severe bias under the null (meanbeta_hataround 0.71 instead of about 0.005, coverage around 13% instead of 95%). Both columns are now protected, the same pattern already used for the Weibull-frailty design matrix below. -
InferenceSurvivalStratCoxPHRegr’s score-test information closures returned the raw Cox partial-likelihood Hessian unnegated. Since that Hessian is negative semi-definite (a concave log-likelihood), the “information” matrix fed to the score test was itself negative-definite, so the shared score-test helper’s positivity check always failed —compute_score_two_sided_pval()/compute_score_confidence_interval()returnedNAon every call, regardless of formula. Fixed to negate, as the siblingInferenceSurvivalCoxPHRegralready did. -
get_clogit_plus_glmm_hessian_cpp()’s exported wrapper negated an objective that already returns the positive information matrix (not the raw log-likelihood Hessian), soInferencePropKKGLMMandInferenceIncidKKCondLogitGLMMIVWC/OneLikfed the score test a negative-definite matrix — the same failure mode as the StratCoxPH bug above, reproducing an approximately 100%NArate for their score test regardless of formula. The extra negation is removed. - Six ordinal-response inference classes —
InferenceOrdinalAdjCatLogitRegr,InferenceOrdinalCauchitRegr,InferenceOrdinalCloglogRegr,InferenceOrdinalOrderedProbitRegr,InferenceOrdinalContRatioRegr, andInferenceOrdinalPropOddsRegr— extractedb[length(b)](the last covariate’s slope) as the treatment coefficient instead ofb[1](treatment is always the design matrix’s first column). The two coincide only when the model has no covariates beyond treatment; with covariates present, the randomization test and the Bayesian-bootstrap machinery silently estimated and tested a different covariate’s effect instead of treatment’s (confirmed via near-total null rejection ondesign_formula = ~.paths). - The log-normal-frailty Weibull AFT model (
InferenceSurvivalGLMMWeibullFrailtyNormalIVWC/OneLik) fit its design matrix with no intercept column. Without one, the control arm’s baseline log-time was pinned at 0 and the mean-zero Gaussian frailty could only partly absorb it; the leftover bias (plus the Gumbel error’s nonzero mean) leaked into the treatment estimate, inflating Wald/score/LR/ bootstrap rejection to roughly 50-70% under the null (nominal 5%). - The zero-inflated negative binomial kernel (
fast_zinb.cpp) had two bugs in its ZIP-limit reduced fit: a fixed-parameter index was off by one, so the reduced fit pinned the parameter before the one requested (e.g. the intercept instead of the treatment coefficient); and the ZIP-limit score vector was one entry shorter than the full parameter vector and was not zero-padded, so score-test consumers compared it against a differently-sized information matrix. -
InferenceOrdinalKKGEEfit its GEE model on the raw, unreduced design matrix; rank-deficient fixtures (e.g.~0+.model matrices) made themultgee::ordLORgee()backend refuse the fit outright, silently swallowed toNULL(74-89%NArates observed on affected data shapes). It now retries through the same QR-hardened rank-reduction machinery used elsewhere before giving up. - Five classes’ Bayesian-bootstrap machinery discarded an already-computed per-replicate SE for the treatment coefficient and always reported
NAinstead, starving their studentized/BCa variants of any SE:InferenceOrdinalPropOddsRegr,InferenceCountQuasipoisson,InferenceCountRobustPoisson, the glmmTMB-based weighted refit path shared by the zero-augmented Poisson classes, andInferenceAbstractKKOrdinalCLMM(the shared base of the KK ordinal CLMM classes). -
InferenceProportionFractionalLogitwas missing quasi-binomial dispersion scaling, systematically overstating standard errors — 0 rejections out of several hundred simulated replicates under the true null (near-zero power rather than nominal-level power). -
InferenceIncidLogBinomial’s Bayesian bootstrap discarded boundary-hitting refit replicates instead of retaining them, shrinking the empirical spread of the bootstrap distribution — observed test size 25-36% instead of nominal 5%, and CI coverage 56-70% instead of 95%. -
InferenceExtPRWSubsamplingwas missing the finite-population correction for without-replacement subsampling, observed at roughly 9.75% Type-I error instead of nominal 5% at a subsample fraction of about 0.4. -
InferenceExtPRWSubsamplingandInferenceExtMOutOfNBootstrap’s failure gate checked only the absolute count of finite replicates (default minimum 5), not the fraction of the requestedB/m. WithBin the hundreds, a high (24%+) convergence-failure rate could still pass the gate, producing a falsely-precise, degenerate p-value. The gate now also requires a majority of replicates to succeed. - The zero-augmented Poisson classes’ shared information-matrix code now neutralizes the zero-inflation coefficient block when the ZI submodel’s fitted probability collapses to its boundary, preventing inflated likelihood-ratio-test Type-I error in that regime.
- The KK-GEE shared mixin’s QR-hardened column-dropping fallback read a nonexistent
attempt$X_fitfield (the correct field isattempt$fit), so the fallback candidate was never actually generated for any class composing that mixin (continuous/count/incidence/proportion/ordinal-KK GEE classes). - The generic score test (
InferenceExtInformationMatrix) returnedNAfor the large majority of calls fromInferenceContinKKGLMMandInferenceCountKKGLMM— their null-constrained refit’s nuisance-parameter information is positive definite only about 32% of the time near a variance-component boundary, which is expected behavior of the likelihood surface there, not a sign of a bad fit. This made the score test degenerate (0% Type-I error and 0% power together, rather than merely miscalibrated). A ridge-regularized fallback now activates only when the unregularized path already returned a non-finite p-value. -
DesignFixedBlockingsilently ignored user-supplied block IDs: the randomization draw always re-derived blocks from the raw covariates instead of using thema caller passed at construction. -
InferenceSurvivalGehanWilcoxandInferenceSurvivalLogRankfit their null Cox model with the default (Efron) tie-handling, inconsistent with the Breslow/Nelson-Aalen convention their fast C++ kernels assume — a genuinely different martingale residual under tied event times. Both now fit withmethod = "breslow"explicitly. -
InferenceSurvivalRestrictedMeanDiff(RMST) never populated the treatment coefficient’s SE on a full (non-estimate_only) fit, unlike every peer class, so bootstrap callers expecting it for a studentized pivot gotNA. -
InferenceOrdinalPairedSignTest: an estimate is no longerNaNwhenever any single pair-difference isNA— valid pairs are now used. Its bootstrap and jackknife distribution methods, previously disabled with an error asserting they violate the matched-pair design constraint, are available again. - Bootstrap-family methods (nonparametric, m-out-of-n, subsampling, BCa) now refuse with an explicit error for
DesignSeqOneByOneand its subclasses, exceptDesignSeqOneByOneBernoulli(whose assignments do not depend on prior subjects, so row resampling is valid there). These methods previously ran without error for sequential designs in general and were documented as merely “conservative”; that claim did not hold and has been removed along with the methods for the other sequential designs. - An OpenMP worker thread (not the master) calling into R’s interrupt or time-budget checks could raise an exception across the OpenMP thread boundary, crashing the whole R process (
SIGABRT) instead of cleanly interrupting, undernum_cores > 1. Both checks now no-op on any thread but the master. -
InferenceSurvivalCoxPHRegr’s internalcoxph.fitwrapper crashed assigning column names to a 0-column design matrix (length of 'dimnames' [2] not equal to array extent) on null-model refits — e.g.compute_lik_ratio_two_sided_pval()/compute_score_two_sided_pval()undermodel_formula = ~1— becausepaste0("x", seq_len(0))returns"x"rather thancharacter(0). The column-naming step is now skipped for a 0-column matrix. -
SimulationFramework’smirai-based parallelization (set_num_cores(force_mirai = TRUE)) could hang indefinitely if a daemon died before connecting. Daemon launch and every daemon-collection call are now bounded by a deadline, with one relaunch attempt and a clear error in place of an unbounded wait. - Randomization confidence intervals are no longer offered for the six log-hazard-ratio (Cox-family) survival classes —
InferenceSurvivalCoxPHRegr,InferenceSurvivalKKLWACoxPHIVWC/OneLik,InferenceSurvivalKKStratCoxPHIVWC/OneLik, andInferenceSurvivalStratCoxPHRegr(which already refused). The generic randomization CI inverts an accelerated-failure-time sharp null, so itsdeltaaxis is a log time ratio; these classes’ estimates are log hazard ratios, and the Cox model has no shape parameter linking the two. The search was being seeded on the wrong axis and returned bounds that were not a confidence interval for anything (on a Weibull test case: estimate −1.70, “CI”[−1.70, −1.26]). A directcompute_rand_confidence_interval()call now stops with an explanation, andInferenceSuiteno longer lists the method for them, as for incidence responses. The randomization p-value and the randomization- bootstrap CI (a percentile interval on the estimate’s own scale) are unchanged. AFT-scale survival classes (Weibull, marginal Weibull, Weibull frailty, rank regression) are unaffected.
Documentation
-
compute_rand_confidence_interval()documents the impute-then-permute construction (Rosenbaum 2002; Imbens & Rubin 2015) and, for survival responses, the AFT residual construction and its censoring assumptions (Tsiatis 1990; Wei, Ying & Lin 1990; Jin, Lin, Wei & Ying 2003). -
InferenceOrdinalStereotypeLogitRegr’s likelihood-ratio test (compute_lik_ratio_two_sided_pval()) now documents that it has inflated Type-I error (roughly 18-23% vs. a nominal 5%) for this class specifically (a non-regular case in the sense of Davies 1977), and recommends the bootstrap (~6-7%) or Bartlett-corrected (~4%) variants instead. The flagged method’s own behavior is unchanged. -
InferenceSuite’s combined-evidence documentation adds a “same-Y does not mean same estimand” caveat: rows testing the same outcome under different link functions/estimands do not share one coherent null hypothesis under the weak (asymptotic) null, only under the randomization sharp null — relevant to interpretingcombined_evidence$pval.
EDI 1.0.0
Initial release of EDI (Experimental Design and Inference): a framework that pairs randomized experimental designs — fixed-sample and sequential — with inference procedures matched to each design and response type, so that estimation and testing always reflect how the data were generated.
Experimental designs
- Fixed-sample designs (all n subjects assigned at once via
assign_w_to_all_subjects()):DesignFixedBernoulli,DesignFixediBCRD,DesignFixedFactorial,DesignFixedBlocking,DesignFixedCluster,DesignFixedBlockedCluster,DesignFixedBinaryMatch,DesignFixedMatchingGreedyPairSwitching,DesignFixedGreedy,DesignFixedGreedyDOptimal,DesignFixedOptimalandDesignFixedOptimalBlocks(mixed-integer-programming optimal designs viaompr/GLPK, with simulated-annealing and greedy alternatives), andDesignFixedRerandomization. - Sequential one-by-one designs (each subject assigned on arrival via
add_one_subject_to_experiment_and_assign(), maintaining covariate balance):DesignSeqOneByOneBernoulli,DesignSeqOneByOneiBCRD,DesignSeqOneByOneUrn,DesignSeqOneByOneEfron(biased coin),DesignSeqOneByOneAtkinson,DesignSeqOneByOnePocockSimon(minimization),DesignSeqOneByOneRandomBlockSize,DesignSeqOneByOneSPBR(stratified permuted block), and the Kapelner-Krieger matching-on-the-fly family that builds matched pairs from the accruing subject stream:DesignSeqOneByOneKK14,DesignSeqOneByOneKK21,DesignSeqOneByOneKK21stepwise. - Observational designs (containers for already-observed, non-randomized assignments with blocking/matching structure):
ObservationalDesign,ObservationalDesignBlocks,ObservationalDesignMatching. - Custom-design extension bases for user-defined assignment rules:
DesignFixedCustom,DesignCustomSequential. - Unequal allocation supported; missing covariate data imputed automatically (
missRanger/missForest).
Response types
Six response types, each with its own matched inference classes: continuous, incidence (binary), count, proportion (values in [0, 1]), ordinal, and survival — the survival response supporting exact, left-censored, right-censored, and interval-censored observations through one y/y_L/y_R interface.
Inference
- Continuous: OLS (
InferenceContinOLS), Lin’s covariate-interacted OLS, quantile regression, robust (Huber) regression, and for matched (KK) designs GLMM (InferenceContinKKGLMM), OLS/quantile/robust variants in both IVWC (inverse-variance-weighted combination) and combined-likelihood pooling, plus the Bai adjusted-t estimators (InferenceBaiAdjustedTKK14,InferenceBaiAdjustedTKK21). - Incidence: logistic, probit, log-binomial, and identity-link binomial regression, Wald and exact binomial tests, Fisher’s exact test, CMH, Newcombe and Miettinen-Nurminen risk-difference intervals, extended-Robins and Zhang (2026) exact test-inversion randomization CIs, g-computation marginal effects, modified Poisson, and conditional-logit / GLMM classes for matched designs.
- Count: Poisson, quasi-Poisson, robust Poisson, negative binomial, zero-inflated and hurdle models, composite likelihood, conditional Poisson, and GEE classes for matched designs.
- Proportion: beta regression, fractional logit, zero-one-inflated beta, quantile regression, g-computation, and matched-design GEE/quantile variants.
- Ordinal: proportional odds, partial proportional odds, adjacent-category logit, continuation-ratio, stereotype logit, ordered probit, cauchit and complementary-log-log links, g-computation, ridit scoring, Jonckheere-Terpstra, paired sign test, and CLMM-based matched-design classes; randomization confidence intervals for ordinal GLM effects are obtained by inverting the exact permutation test (following the Wang-Rosenberger approach).
- Survival: Cox proportional hazards (plain and stratified), Weibull AFT (with full censoring support), restricted mean survival time, log-rank and Gehan-Wilcoxon tests, Kaplan-Meier survival differences, Weibull frailty GLMMs (log-gamma and normal frailties), Clayton-copula and dependent-censoring-transform estimators, and LWA/rank-regression classes for matched designs.
- Cross-cutting estimators usable across response types:
InferenceAllSimpleAverageDiff,InferenceAllSimpleMeanDiffPooledVar,InferenceAllSimpleWilcox,InferenceAllKKMeanDiffIVWC,InferenceAllKKWilcoxIVWC. - Every applicable procedure at once:
InferenceSuiteruns all inference classes valid for a given design/response combination and reports a single Cauchy-combined p-value alongside the individual results. - Custom-inference extension bases:
InferenceCustomAsymp,InferenceCustomBoot,InferenceCustomRand. - Where a specialized engine is best-in-class, estimation delegates to it —
glmmTMB(GLMMs),fixest(fast GLMs),aftgee(rank-based AFT),Rfit(R-estimation),survival— with EDI’s own C++ kernels used everywhere else.
Resampling and randomization machinery
- Non-parametric, parametric, and Bayesian bootstrap; BCa intervals; jackknife; m-out-of-n bootstrap and Politis-Romano-Wolf subsampling; exchangeable-resampling-unit handling for blocked/matched/cluster structures; minimum-volatility CI selection.
- Randomization tests with sequential Monte Carlo p-values, custom randomization statistics, quantile randomization CIs, and randomization/bootstrap confidence intervals via parallel bisection test-inversion.
Simulation framework
-
SimulationFrameworkruns Monte Carlo power, size, and operating-characteristic studies across designs, response types, and inference procedures, withcoverage_pval/size_pvalcalibration diagnostics;SimulationFrameworkReportrenders results. - Helpers
generate_covariate_dataset()andtransform_cont_y_based_on_response_type(); optional parallelization viamirai(set_num_cores()/unset_num_cores()).
Performance
- All model-fitting and variance kernels implemented in C++ (Rcpp, RcppEigen/Eigen, RcppNumerical, LBFGS++, IRLS, OpenMP), exposed as documented
fast_*functions — typically one to three orders of magnitude faster than the corresponding pure-R fits (see the shipped benchmark comparisons against each canonical R baseline). - Machine-specific tuning:
tune_EDI_for_this_machine()benchmarks the local machine across four axes and persists tuned performance-policy defaults (get_local_EDI_optimization(),clear_local_EDI_optimization()). - Runtime-tunable dispatch policies for optimizer choice, cold/warm-start heuristics, and parallel/serial execution:
get_optimization_dispatch_policy()/set_optimization_dispatch_policy()and the corresponding*_cold_start_,*_warm_start_, and*_parallel_dispatch_policy()pairs, plusget_bootstrap_dispatch_policy(). - Install-time build configuration via environment variables (
EDI_PORTABLE,EDI_NATIVE_SPEED,EDI_NATIVE_LTO,EDI_UNITY,EDI_DISABLE_VECTORIZATION,EDI_DEBUG_SYMBOLS): a tuned-march=nativeunity build by default locally, and a fully portable, warning-free build for CRAN/CI (auto-selected on r-universe builders). - Runtime argument-checking can be disabled for production speed with
toggle_asserts().
Documentation and extensibility
- Five concept vignettes: notation glossary; reproducibility (RNG and seed conventions); backend contracts (
fast_*/C++ kernel conventions); validation evidence; and extending EDI with your own design and inference classes (backed by the design/inference class registries and theDesignFixedCustom/DesignCustomSequential/InferenceCustom*bases). - Utilities including
create_model_matrix_from_features(),robust_negbinreg(),robust_survreg(), androbust_survreg_with_surv_object().
