rcorrp.cens {Hmisc}R Documentation

Rank Correlation for Paired Predictors with a Censored Response

Description

Computes U-statistics to test for whether predictor X1 is more concordant than predictor X2, extending rcorr.cens. For method=1, estimates the fraction of pairs for which the x1 difference is more impressive than the x2 difference. For method=2, estimates the fraction of pairs for which x1 is concordant with S but x2 is not.

Usage

rcorrp.cens(x1, x2, S, outx=FALSE, method=1)

Arguments

x1 first predictor
x2 second predictor
S a possibly right-censored Surv object. If S is a vector instead, it is converted to a Surv object and it is assumed that no observations are censored.
outx set to T to exclude pairs tied on x1 or x2 from consideration
method see above

Value

a vector of statistics

Author(s)

Frank Harrell
Department of Biostatistics, Vanderbilt University
f.harrell@vanderbilt.edu

See Also

rcorr.cens, somers2, Surv

Examples

set.seed(1)
if(.R.) library(survival)
x1 <- rnorm(400)
x2 <- x1 + rnorm(400)
d.time <- rexp(400) + (x1 - min(x1))
cens   <- runif(400,.5,2)
death  <- d.time <= cens
d.time <- pmin(d.time, cens)
rcorrp.cens(x1, x2, Surv(d.time, death))
# rcorrp.cens(x1, x2, y) ## no censoring

[Package Hmisc version 3.0-10 Index]