Standalone proportional hazards (PH) assumption diagnostics, usable on any
fitted survival::coxph model, or on a cbe_cox or
cbe_cox_multi object. Wraps survival::cox.zph() with a tidy
per-term table, a per-term violation flag, and an automated text summary.
Arguments
- fit
A fitted
survival::coxphmodel, or acbe_coxorcbe_cox_multiobject.
Value
An object of class cbe_cox_check containing:
zph: Thesurvival::cox.zphobject (orNULLif it could not be computed).zph_table: Data frame version ofzph$table(one row per term, plus aGLOBALrow for multivariable fits).zph_violated: Named logical vector, one entry per term (excludingGLOBAL),TRUEwhere the assumption is violated (p < 0.05). For a univariable fit this is a length-1 named logical vector.zph_text: Automated summary sentence (a single string for a univariable fit with one term; a two-element character vector, per-term then global, for a multivariable fit).
