Changelog
survdistr 0.0.3
CRAN release: 2026-04-09
- Improved documentation
- Refactored
interp_cif() - Added trapezoidal integration option for continuous hazard/density to survival conversion in
convert_to_surv() - Renamed argument:
trim_duplicatestotrim_dups
survdistr 0.0.2
- Added
convert_to_surv()for efficient transformation of hazard/density functions to survival at anchor time points (uses C++ internally). - Introduced
trim_duplicates()to remove repeated S(t) values across the time axis, with tolerance. - Added
interp_cif()for constant interpolation of CIF (uses C++ internally). - Added
extract_times()to consistently obtain and validate time points from vectors or matrices. - Unified assertion functions into one:
assert_prob(). - Unified
mat_interp()andvec_interp()into a singleinterp()function. - Enhanced
interp():- Added aliases for the three interpolation options (e.g.,
const_hazis equivalent toexp_surv). - Implemented S(t) interpolation in C++ for all 3 options (
output = "surv"); H(t) and F(t) follow similarly. - Implemented f(t) interpolation in C++ for all 3 options (
output = "density") - Implemented h(t) interpolation in C++ for all 3 options (
output = "hazard") - Requires unique and ordered
eval_times, resulting in significant C++ speed-up. - Allows passing
timesseparately to preserve precision.
- Added aliases for the three interpolation options (e.g.,
- Improved
survDistr:- Removed
data_typeargument; input now only S(t). - Added aliases for the three interpolation options.
- Allows passing
timesduring construction separately for precision. - Introduced
filter()method for in-place object filtering. - Added
rowsargument to filter input matrix before interpolation without altering the object. -
methodandtimesare now active fields, not public members. - Added S3 conversion via
as_survDistr(x).
- Removed
- Added unit tests for all features.