get_coxsnell: Extract data needed to create Cox-Snell vs. Cumulative hazard...

Description Usage Arguments Value Examples

View source: R/coxph_utility.R

Description

Extract data needed to create Cox-Snell vs. Cumulative hazard plot

Usage

1

Arguments

fit

the result of fitting a Cox regression model, using the coxph or coxme functions.

Value

A data frame containing (not censored) Cox-Snell residuals (coxsnell) and Nelson-Aalen estimate of the Cumulative Hazard (Lcumu_hazard) as well as the Breslow estimate for the Survival function (survival) for censored data.

Examples

1
2
3
4
5
library(survival)
data("tongue", package="KMsurv")
cox.tongue <- coxph(Surv(time, delta)~as.factor(type), data=tongue)
cs.data <- get_coxsnell(cox.tongue)
head(cs.data)

adibender/ldatools documentation built on March 7, 2020, 5:30 a.m.