Skip to content

v0.2.0

Choose a tag to compare

@rich-iannone rich-iannone released this 10 Jul 23:49
16ed658

Greenwood v0.2 provides several expansions to statistical testing, visualization capabilities, and confidence interval support. This release introduces stratified cross-validation for model evaluation, powerful group comparison tools including linear trend tests and restricted mean survival time (RMST) comparisons, interactive publication-ready forest plots and cumulative incidence visualizations with Great Tables integration, and comprehensive confidence interval estimation for baseline hazard and survival predictions in both Cox and parametric AFT models.

New Features

  • Stratified cross-validationcross_validate() now supports stratified k-fold CV for survival data, ensuring balanced outcome distributions across folds for more reliable model evaluation. (#3)

  • Forest plot visualization — New forest_plot() function creates interactive publication-quality forest plots for displaying hazard ratios and confidence intervals across multiple strata or subgroups with aligned at-risk tables. (#3)

  • Cumulative incidence plots — New cif_plot() function visualizes competing risk cumulative incidence functions with competing event stacks, censoring indicators, and optional at-risk tables. (#3)

  • Risk table with Great Tables — Enhanced risk table visualization using Great Tables for improved styling. (#3)

  • Baseline hazard confidence intervalsCoxPH.baseline_hazard() now supports confidence intervals via the ci= and conf_level= parameters, enabling uncertainty quantification for baseline hazard estimates. (#4)

  • AFT survival prediction confidence intervalsAFT.predict() now includes ci= and conf_type= parameters for confidence intervals on survival predictions using delta-method standard error estimation. (#4)

  • Linear trend test — New trend_test() function tests for linear trends across ordered groups (e.g., disease stages or dose levels) with support for Fleming-Harrington weights and stratification, providing higher power when groups are naturally ordered.

  • RMST group comparison — New rmst_test() function performs hypothesis tests for restricted mean survival time (RMST) equality across groups, with confidence intervals for RMST differences and support for both ratio and percentage-difference estimands.

  • Pairwise RMST comparisons — New pairwise_rmst_test() function enables multiple pairwise RMST comparisons with adjustable p-value correction methods (Bonferroni, Holm, etc.).

  • RMST difference utility — New rmst_diff() function calculates RMST differences and ratios between two groups with full confidence interval and variance estimation.

Bug Fixes

  • CoxPH coefficients are now properly invariant to uniform weight scaling, fixing a numerical issue where coefficient estimates changed with different weight magnitudes. (#2)

Enhancements

  • AFT confidence interval calculations now use stabilized log-log transformations for improved numerical stability in edge cases.
  • Multiple improvements to baseline hazard CI bounds and test stability for Cox models.
  • Enhanced input validation and type checking for visualization functions.

Documentation

  • Added comprehensive guide section for baseline hazard confidence intervals in Cox models.
  • Added AFT survival CI prediction guide with examples.
  • Documented linear trend tests in the group comparisons user guide.
  • Added RMST comparison examples to group comparisons documentation.