get_cox_assumptions: Check assumptions fo a CoxPH model.

View source: R/functions.R

get_cox_assumptionsR Documentation

Check assumptions fo a CoxPH model.

Description

Checks the normality and proportional hazard assumption for a CoxPH model. Technically, the normality assumption is tested with Shapiro-wil test, the proportionality by cox.zph.

Usage

get_cox_assumptions(
  cox_model,
  type.predict = "lp",
  type.residuals = "martingale",
  data = NULL,
  ...
)

Arguments

cox_model

a CoxpPH model or a coxex object.

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.

data

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

...

extra arguments passed to get_cox_qc

Value

a data frame with the normality testing results and the proportional hazard assumption testing for the model variables and the global model.

References

  • Grambsch, P. M. & Therneau, T. M. Proportional Hazards Tests and Diagnostics Based on Weighted Residuals. Biometrika 81, 515 (1994).


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