Changelog
Source:NEWS.md
hazrd 0.2.1
New features
-
phs_km_curve(): newintervalsparameter accepts a list ofc(lo, hi)percentile pairs, enabling overlapping KM strata (e.g. top 5%, top 20%, bottom 20%). Default produces four bands: 0.95-1, 0.80-1, 0.30-0.70, and 0-0.20. The legacybreaksparameter is retained for backward compatibility.
Bug fixes
-
phs_km_curve(): fixed malformedman/phs_km_curve.Rdcaused by percent signs in roxygen@paramtext corrupting the\arguments{}block and producing R CMD check warnings.
Documentation
- Vignette updated with overlapping intervals examples and
breakslegacy usage. - README installation section updated to use
devtools::install_github(); dev-branch instructions added (@dev). -
NEWS.mdcorrected: function namephs_km->phs_km_curve, stale preset list removed,phs_cox_curveentry added.
hazrd 0.2.0
New functions
-
phs_metrics()— single entry point for all discrimination metrics (HR, C-index, OR, HR_SD). Returns a tidy tibble with one row per metric. Supports built-in bootstrapping viaboot::boot()with"percentile","bca", and"normal"CI methods. -
phs_km_curve()— Kaplan-Meier curves stratified by PHS percentile group. Returns aggplotobject by default (output = "plot") or a tidy data frame (output = "data"). Accepts anintervalslist for overlapping strata (e.g. 95–100 %, 80–100 %) or abreaksvector for exclusive bins. Supports aref_dataargument for train/validation percentile workflows. -
phs_cox_curve()— Cox model-based survival curves at specified PHS percentiles. Fits a Cox PH model withphsas the sole predictor and returns smooth predicted curves at user-supplied percentile values. Supportsref_datafor train/validation workflows.
Deprecated functions
The following functions are deprecated as of 0.2.0 and will be removed in 0.3.0. They continue to work and emit a deprecation warning pointing to the replacement call.
-
get_hr()→ usephs_metrics(data, metrics = "HR") -
get_or()→ usephs_metrics(data, metrics = "OR", or_age = ...) -
get_cindex()→ usephs_metrics(data, metrics = "C_index") -
get_hrsd()→ usephs_metrics(data, metrics = "HR_SD") -
km_curve()→ usephs_km_curve()
Removed functions
-
create_lookup_table()— superseded by the upcomingphs_abs_risk(). -
cum_inc()— out of scope for the package API. -
get_phs_age()— internal helper; will be re-exposed viaphs_abs_risk().
Bug fixes
-
phs_metrics()withmetrics = "OR":or_agevalues outside the observed KM time range now returnNAwith an informative warning instead of propagating silentNAor infinite odds (#or-edge-case). -
phs_metrics()withmetrics = "HR_SD"andbootstrap = TRUE: HR_SD is now correctly included in the bootstrap statistic vector so thatconf_low,conf_high, andseare populated.