predict.phreg hardening
klaus-holst opened this issue · comments
Klaus Holst commented
library("mets")
n <- 1e2
t <- rexp(n)
cat <- sample(c("A", "B"), replace = TRUE, size = n)
d <- data.frame(t = t, cat = cat)
model <- phreg(Surv(t)~cat, data = d)
predict(model, newdata = data.frame(cat = c("A", "B")))
predict(model, newdata = data.frame(cat = "A"))