multcomp 的generalsiminf.pdf 中有一个例子。在这里简化
library(multcomp)
library(survival)
if (!file.exists("AML_Bullinger.rda"))
load(url("http://www.stat.uni-muenchen.de/~hothorn/data/AML_Bullinger.rda", open = "r"))
risk <- rep(0, nrow(clinical))
rlev <- levels(clinical[, "Cytogenetic.group"])
risk[clinical[, "Cytogenetic.group"] %in% rlev[c(7,8,4)]] <- "low"
risk[clinical[, "Cytogenetic.group"] %in% rlev[c(5, 9)]] <- "intermediate"
risk[clinical[, "Cytogenetic.group"] %in% rlev[-c(4,5, 7,8,9)]] <- "high"
risk <- as.factor(risk)
names(clinical)[6] <- "FLT3"
save(clinical,file="AML_Bullinger.rda")
smod <- survreg(Surv(time, event) ~ Sex + Age + WBC+risk,
data = clinical)
summary(glht(smod, linfct = mcp(risk = "Tukey")))