Changelog
Source:NEWS.md
aftsplex 0.3.3
-
two_stage_bootstrap()now returns a classed"two_stage_bootstrap"object with asummary()method: a quantile table of the corrected curve and its 95% percentile CI, plus the replicate yield, the exposure anchor, and the Phase-1sigma_w_sqspread across the replicates whose calibration succeeded. Previouslysummary()fell through to the generic list output. The returned object also gains anx_refelement; existing element access is unchanged.
aftsplex 0.3.2
- Documentation: clarified the
distargument offit_aft_spline(),simex_aft_spline(), andtwo_stage_bootstrap(). It accepts any distribution supported bysurvival::survreg()(e.g."weibull","loglogistic","exponential","gaussian"), with"lognormal"only the default; the help pages now link tosurvival::survreg()for the full list.
aftsplex 0.3.1
Robustness fixes surfaced by an adversarial stress-test of 0.3.0. All changes are input guards and a bug fix; valid-input behaviour and the byte-identical generate_aft_data() baseline are unchanged.
-
two_stage_bootstrap()no longer crashes on the serial path (workers = 1, the default) when bootstrap replicates fail. A failed replicate returnedNULLandlist[[r]] <- NULLdeleted the element, shrinking the result list and triggering “missing value where TRUE/FALSE needed”; the documented drop-and-warn behaviour now works on both the serial and parallel paths. -
fit_me_calibration(),gls_combine(),compute_ise(),sigma_u_for_reliability(),build_sigma_u(), andgenerate_aft_data()now validate their inputs and raise informative errors instead of silently propagatingNaN/Infor returning a meaningless result: constant/too-small validation samples, non-finite or uninformative (zero-slope) surrogates, singular surrogate covariances, unsorted or length-mismatchedcompute_ise()arguments, non-positivevar_x/ratios/sigma_u_sq, out-of-rangerho, and negativex_sd. - Clarified that the serial (
workers = 1) bootstrap is the canonical bit-for-bit reproducible path; parallel runs use independent L’Ecuyer streams that are reproducible across worker counts but differ from the serial result for the same seed by design. - Documentation: new
applied-lpaarticle presenting the dose-response on the applied scale – the time-acceleration ratio against light-physical-activity minutes, anchored at a 200 min/day reference, with the lower-support caveat and a two-stage vs single-stage interval-width comparison. Thequickstartand thesimulation-studydaily-scale section now use the manuscript’s daily-LPA log scale (x_mean = log(300),x_sd = 0.45), correcting an earlier raw-minute parameterisation. Thefaqarticle gains a parallel-execution / reproducibility note.
aftsplex 0.3.0
Realistic-scale data-generating process, two new simulation diagnostics, and a robustness pass on the bootstrap/SIMEX failure modes.
-
generate_aft_data()gainsx_mean,x_sd, andf_argsso the latent exposure and dose-response can be expressed on a meaningful scale (e.g. daily light-physical-activity minutes, mean ~300 with a 150-minute threshold). The defaults reproduce the previous arbitrary-unit output bit-for-bit. - New exported
sigma_u_for_reliability()returns a measurement-error covariance targeting a given mean per-surrogate reliability, for sweeping measurement quality (e.g. 0.5 / 0.65 / 0.8). - The
simulation-studyvignette gains a “daily-minutes scale” section with a reliability sweep (Oracle / Naive / SIMEX ISE across reliability) and a per-surrogate ladder (each surrogate alone vs the GLS combiner via the existingsurrogate_patternargument; no engine change). - Robustness pass (a user hit an all-NA bootstrap curve with no message, then an opaque error at plotting).
two_stage_bootstrap()now isolates each replicate so a degenerate resample drops to NA instead of aborting the run, and emits a single summary warning (replicates dropped, grid points with no finite value, all-NA point estimate, or all replicates failed). The full-sample calibration gives a clear message on collinear/constant surrogates instead of a raw Lapack error, and pointwise summaries are NA-safe. -
simex_aft_spline()returns NA at grid points with too few converged perturbed fits (one summary warning) instead of erroring with “0 (non-NA) cases”; a failed naive fit now gives an informative error. -
plot_curves()drops entirely-NA curves with a warning and stops with a clear message when nothing is left to plot, instead of an empty panel. - New “Troubleshooting” article documenting every warning/error message, and a “coverage diagnostics” article.
aftsplex 0.2.0
Revision round addressing reviewer feedback. All additions are backward-compatible via defaults; existing output and the SIMEX regression are unchanged.
-
two_stage_bootstrap()gainsnestedto toggle between the full two-stage (double) bootstrap and a single-stage interval that holds the Phase-1 calibration fixed, so the Phase-1 contribution to CI width can be quantified. -
two_stage_bootstrap()andsimex_aft_spline()gainx_refto anchor the centred curves (and every bootstrap replicate) at a clinically meaningful reference exposure before quantiles are taken. -
two_stage_bootstrap()andsimex_aft_spline()gainsupport_probs, which flags grid points outside the exposure support (returned asin_support) and warns that they are spline extrapolations rather than fits. -
plot_curves()andplot.simex_aft_spline()gaintime_ratioto plot the exponentiated (time-ratio) curve with a reference line at 1, and render out-of-support segments dashed with a lighter ribbon. -
two_stage_bootstrap()gainsworkersfor parallel execution of the outer bootstrap loop viafuture.apply(per-task L’Ecuyer streams; serial default unchanged). Addsfutureandfuture.applyto Suggests.