phcpe: Gonen & Heller Concordance Probability Estimate for the Cox...

Description Usage Arguments Value Author(s) References Examples

Description

A function to calculate Gonen \& Heller concordance probability estimate (CPE) for the Cox proportional hazards model.

Usage

1
phcpe(coxfit, CPE.SE=FALSE,out.ties=FALSE)

Arguments

coxfit

A coxph or cph object

CPE.SE

A logical value indicating whether the standard error of the CPE should be calculated

out.ties

If out.ties is set to FALSE,pairs of observations tied on covariates will be used to calculate the CPE. Otherwise, they will not be used.

Value

CPE

Concordance Probability Estimate

CPE.SE

the Standard Error of the Concordance Probability Estimate

Author(s)

Qianxing Mo, Mithat Gonen and Glenn Heller; qmo@bcm.edu

References

Mithat Gonen and Glenn Heller. (2005). Concordance probability and discriminatory power in proportional hazards regression. Biometrika, 92, 4, pp.965-970

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### create a simple data set for testing
set.seed(199)
nn <- 1000
time <- rexp(nn)
status <- sample(0:1, nn, replace=TRUE)
covar <- matrix(rnorm(3*nn), ncol=3)
survd <- data.frame(time, status, covar)
names(survd) <- c("time","status","x1","x2","x3")

coxph.fit <- coxph(Surv(time,status)~x1+x2+x3,data=survd)

### Calculate CPE only (needs much less time).
phcpe(coxph.fit)
phcpe(coxph.fit,out.ties=TRUE)
#result is identical because the covariates are not tied #

### Calculate CPE and CPE.SE
phcpe(coxph.fit, CPE.SE=TRUE)
phcpe(coxph.fit, CPE.SE=TRUE,out.ties=TRUE)

#*** For unknown reason, 'coxph.fit' may need to be removed before running cph()***
rm(coxph.fit)

cph.fit <- cph(Surv(time, status)~x1+x2+x3, data=survd,method="breslow")

### Calculate CPE only (needs much less time).
phcpe(cph.fit)
phcpe(cph.fit,out.ties=TRUE)

### Calculate CPE and CPE.SE
phcpe(cph.fit, CPE.SE=TRUE)
phcpe(cph.fit, CPE.SE=TRUE,out.ties=TRUE)


Search within the CPE package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.