calogrank | R Documentation |
Logrank test to compare survival curves adjusting for covariates
calogrank(ftime, fstatus, grp, cvt, strat=NULL)
ftime |
failure times |
fstatus |
status indicator |
grp |
group indicator |
cvt |
continuous covariates used for adjusted analysis |
strat |
stratification variable |
calogrank is the covariate adjusted version of k-sample survdiff. The function in its current form only does basic error checking.
Heller G. and Venkatraman E.S. (2004) A nonparametric test to compare survival distributions with covariate adjustment. JRSS-B 66, 719-733.
## Not run: library(survival)
data(pbc)
pbc1 <- pbc
pbc1$trt[pbc1$trt == -9] <- NA
pbc1$copper[pbc1$copper == -9] <- NA
# only death (2) is considered; transplant(1) is censored
calogrank(pbc1$time, pbc1$status==2, pbc1$trt, pbc1[,c("copper")])
calogrank(pbc1$time, pbc1$status==2, pbc1$trt,
pbc1[,c("protime", "copper")])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.