require(OutlierDC)
data(ebd)
#scoring algorithm
fit <- odc(Surv(log(time), status) ~ meta, data = ebd)
fit
coef(fit)
plot(fit)
fit1 <- update(fit, UB = 4, LB = -4)
fit1
plot(fit1)
fit2 <- update(fit, UB = NA, LB = -4)
fit3 <- update(fit, UB = 4, LB = NA)
# residual-based algorithm
fit4 <- odc(Surv(log(time), status) ~ meta, data = ebd, method = "residual", k = 3)
fit4
plot(fit4)
# boxplot algorithm
fit5 <- odc(Surv(log(time), status) ~ meta, data = ebd, method = "boxplot", k = 1.5)
fit5
plot(fit5, ylab = "log survival times", xlab = "metastasis lymph nodes")Run the code above in your browser using DataLab