get_cox_stats: Goodness of fit for a CoxPH model.

View source: R/functions.R

get_cox_statsR Documentation

Goodness of fit for a CoxPH model.

Description

Calculates fit statistics for a CoxPH model: AIC (Akaike information criterion), BIC (Bayesian information criterion), raw_rsq (unadjusted R-squared, cod, mer or mev/default, see: rsq), MAE (mean absolute error), MSE (mean squared error), RMSE (root MSE), concordance (C) index with 95% confidence intervals (normality assumption) and the integrated Brier score (IBS, see: pec).

Usage

get_cox_stats(
  cox_model,
  data = NULL,
  type.predict = "lp",
  type.residuals = "martingale",
  rsq_type = c("mev", "mer", "cod"),
  ...
)

Arguments

cox_model

a CoxpPH model or a coxex object.

data

the data frame used for the model construction. Ignored, if coxex object provided.

type.predict

type of the prediction, 'lp', linear predictor score by default. See: predict.coxph for details.

type.residuals

type of the residuals, 'martingale' by default. See: residuals.coxph for details.

rsq_type

type of R-squared statistic, see: rsq.

...

extra arguments passed to get_cox_qc.

Value

a data frame with the statistic values.

References

  • Therneau, T. M. & Grambsch, P. M. Modeling Survival Data: Extending the Cox Model. (Springer Verlag, 2000).

  • Harrell, F. E., Lee, K. L. & Mark, D. B. Multivariable prognostic models: Issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors. Stat. Med. 15, 361–387 (1996).


PiotrTymoszuk/coxExtensions documentation built on Feb. 6, 2024, 10:58 p.m.