R2 {PHeval}R Documentation

R2 coefficient

Description

This function calcultates the R^2 coefficient of OQuigley and Flandre (1994) to evaluate the predictive capacity of the proportional hazards model (or Cox model).

Usage

R2(formula, data)

Arguments

formula

A formula object or character string with the time and censoring status separated by "+" on the left hand side and the covariates separated by "+" on the right. For instance, if the time name is "Time", the censoring status is "Status" and the covariates are called "Cov1" and "Cov2", the formula is "Time+Status~Cov1+Cov2".

data

A data.frame with the data. The censoring status should be 1 for failure and 0 for censoring. No missing data accepted.

Details

The program does not handle ties in the data. We suggest to randomly split the ties before using the program.

Value

Author(s)

Cecile Chauvel

References

OQuigley, J. (2008) Proportional hazards regression. Springer New-York. Chapter 12.
OQuigley J, Flandre P. (1994) Predictive capability of proportional hazards regression. PNAS 91, 2310-2314.

Examples

library(survival)
data(ovarian)
R2(futime+fustat~age,data=ovarian)
R2(futime+fustat~age+rx,data=ovarian)

[Package PHeval version 0.5.4 Index]