precmed (development version)
Major changes
Added binary-outcome support to
catecv()for logistic, doubly robust two-regression, and boosting scores. Treatment-stratified repeated splits provide training and held-out subgroup risk differences, ABC, plots, and recorded subgroup diagnostics. Binary splits do not use the balanced-split controlserror.maxandmax.iter.Added binary-outcome estimation on the risk-difference scale.
atefit()and the exportedatefitbinary()provide doubly robust ATE estimation;catefit()provides pooled logistic, doubly robust two-regression and Bernoulli boosting CATE scores, with doubly robust subgroup estimates. BinarytwoRegnow cross-fits outcome and treatment models and estimates a linear projection of the risk difference; its scores and stored fits differ from earlier development versions, andBandKfoldcontrol cross-fitting. Addedsimulate_binary()and a vignette illustrating estimation and held-out subgroup assessment. Numeric, logical and two-valued treatment labels are supported.simulate_binary()now codesy = 1when the relapse count exceedsthreshold(at least one relapse by default), reversing the outcome coding used in earlier development versions. Usehigher.y = FALSEwhen ranking treatment benefit for this adverse outcome. This changes simulated outcomes and reverses the direction of risk differences in the binary vignette.Binary
catefit()now returns and prints thetwoRegrisk-difference score coefficients throughcoef(), matching the coefficient table used for count scores. Fits without a linear binary score no longer print a strayNULL.Standardized bootstrap failure handling across binary, count and survival
atefit(): affected measures now have unavailable inference if any replicate fails or is undefined, instead of silently omitting count replicates. Results record replicate-level reasons inbootstrap.diagnosticsanddiagnostics().Added the population-level
log.cumulative.hazard.ratioattau0to survivalatefit(), with bootstrap inference. Inference is unavailable if the estimate or any bootstrap replicate is undefined. This replaces the conditional Coxlog.hazard.ratioinatefit()output, a breaking change. Subgroup and validation conditional HR outputs remain available ashr.*; their values can change because of the horizon correction described below.Added subgroup cumulative hazard ratios to survival
catefit()andcatecv()aschr.*outputs;hr.*outputs remain conditional Cox hazard ratios. Survival plots and box plots now acceptmeasure = "rmtl"(default),"cumulative_hr", or"conditional_hr"; validation curves can display multiple measures. The previously supportedplot.hrargument is deprecated;plot.hr = TRUEnow selects the cumulative hazard ratio by default rather than the conditional Cox HR. Usemeasure = "conditional_hr"to plot the latter. Older saved objects must be refitted for cumulative hazard plots.Added C backends, enabled by default, for count and survival contrast regression, Cox restricted mean survival integration, and LASSO propensity-score interaction screening. Installing from source now requires a C compiler and R’s standard BLAS/LAPACK libraries.
Added
contrast.control,rmst.control, andps.controlfor numerical backend settings. Setsolver = "R"to use the R implementation; small floating-point differences between backends are possible.Replaced
gbmwithgbm3for boosting models. Existing tuning argument names and the learning rate of 0.1 are preserved; stored fits now have classGBMFit. Results can differ even with identical settings and random seeds.Added
simulate_survival()to generate reproducible synthetic survival data illustrating confounding and heterogeneous treatment effects. Treatment, outcome, and censoring coefficients can be specified. The survival vignette now uses it;survivalExampleremains available. Weibull shape and scale, treatment-specific shape, and the hazard ratio reference time are configurable; defaults retain proportional hazards. Event-time calculations are checked in stages, and error messages identify the relevant model parameters. Invalid censoring rates also identify the censoring model parameters. The newcensor_horizonargument controls administrative censoring (900 days by default;Infdisables it).Fixed continuous boosting predictions by retaining the selected tree count for each treatment arm, and forwarding additional boosting controls.
Minor changes and bug fixes
Binary
atefit()bootstrap plots now display the treatment-specific risks and risk difference by default.metricsselects and ordersrisk0,risk1, andrisk.difference. Older objects without risk bootstrap estimates retain the risk-difference plot.Added
plot()support forcatefitscore distributions, with histograms, optional density curves, method selection, and a configurable reference line. The score axis uses the original treatment labels when available; newly fittedcatefitobjects retain these labels, while older fits use treatment 0/1. Binary, count and survival vignettes now use this method.The binary vignette compares logistic and two-regression scores on the same internal validation splits, uses 10 iterations and larger subgroups to reduce rank-deficient fits, removes the redundant manual validation example, and explains the printed average treatment effect before showing extraction and plotting commands.
Standardized documentation terminology for outcome, treatment and censoring models, clarifying propensity scores and inverse probability of censoring weights.
Clarified binary, count and survival outcome support in the package description, README, quick start and function documentation.
Added an ATE methods vignette covering binary, count and survival outcomes, assumptions and bootstrap inference; the CATE methods vignette separates score development from validation.
Added
combinetoabc()to aggregate cross-validation iterations per scoring method with a mean, median, or user-supplied function. The default still returns the full matrix; missing values are not removed automatically.Added a dashed null reference line to count and survival
atefit()bootstrap log-ratio plots.null.valuedefaults to 0 on the log scale and can be set to another value,NULL, orNA; treatment-specific RMST panels are unchanged.Count
atefit()now retains bootstrap rate estimates and treatment labels; its bootstrap plot displays rates for both treatments alongside the log rate ratio. Older saved fits continue to display the log-ratio panel only.Added
metricstoplot.atefit()to select and order available bootstrap metrics by their names in the fitted object.Improved bootstrap histogram styling with a minimal default theme and panel headings, and added a caption explaining the estimate and null reference lines. Supply
themeto use another ggplot2 theme. Histogram bars now default toalpha = 1so the background grid does not show through them.Applied the same default theme to validation curves and subgroup box plots; their
themeargument still accepts a custom ggplot2 theme. Captions explain the dashed overall treatment effect reference lines. Multi-measure survival plots use horizontal panel headings and matched y scales within each measure. Setshow.overall = FALSEon validation curves or box plots to hide the overall effect line. Validation curves acceptlayout = "method"to compare training and validation curves within method-specific panels. Subgroup box plots now default to two columns;ncolcontrols their layout.Validate outcome types and outcome-specific CATE scoring methods before fitting, including empty and invalid inputs.
Added
catecvCountExample, a pre-fitted validation result used in the ABC and plotting examples to avoid repeatedly fitting models.Label survival
atefit()bootstrap plot panels with the original treatment names when available, and use readable names for the treatment effects.Report automatic treatment recoding as an informational message rather than a warning, while retaining the mapping in existing result objects.
Added
diagnostics()to summarize recorded survivalatefit()treatment recoding information and subgroup errors and warnings fromcatefit()andcatecv()results in a data frame.Added
coef()andconfint()methods for extracting supported treatment effects and confidence intervals from count and survivalatefit()results.Fixed survival Cox hazard ratios to censor follow-up at
tau0instead of treating observations beyond the horizon as events. This affects subgroup and cross-validation hazard ratio estimates; this correction does not change the RMST and RMTL calculations.Fixed survival random forest event coding at
tau0and integrated predicted survival curves through the full horizon when computing RMST. Survival forest scores and scores using forest initial predictions may change.Warn when an out-of-range doubly robust RMST estimate is replaced by an outcome-model estimate, including when this occurs during bootstrap inference.
Fixed intercept-only propensity models in survival cross-fitting, subgroup evaluation, and bootstrap ATE estimation by preserving matrix dimensions.
Fixed LASSO propensity-score dimension handling with two predictors or a single prediction row.
Return
NAwith an informative warning for count-outcome responder subgroups missing one or both treatment arms, instead of failing the analysis. ABC isNAwhen a required validation estimate is unavailable.Use GBM3 cross-validation for single-predictor count boosting fits and boosting initial predictions, removing the legacy out-of-bag workaround and fixing a cross-fitting error when selecting the number of trees.
Removed a duplicate treated-arm boosting fit in count cross-fitting. Results obtained with the same seed may change because fewer random draws are consumed.
Improved performance of balanced splitting, continuous contrast regression, censoring probability calculations, and propensity-score LASSO fitting.
Updated validation plots and box plots for current ggplot2 and tidyselect versions; ggplot2 >= 3.4.0 is now required.
Added the book chapter by Jiang et al. (2026) to the package description and references.
Added Smart Data Analysis and Statistics B.V. as copyright holder for its contributions after version 1.1.0, alongside the existing Biogen attribution.

