## veteran data
library(survival)
data(veteran)
test.bic.surv<- bic.surv(Surv(time,status) ~ ., data = veteran, factor.type = TRUE)
summary(test.bic.surv, conditional=FALSE, digits=2)
plot(test.bic.surv)
imageplot.bma(test.bic.surv)
## pbc data
data(pbc)
x<- pbc[1:312,]
surv.t<- x$time
cens<- as.numeric((x$status == 2))
x<- x[,c("age", "albumin", "alk.phos", "ascites", "bili", "edema", "hepato", "platelet", "protime", "sex", "ast", "spiders", "stage", "trt", "copper")]
x$bili<- log(x$bili)
x$alb<- log(x$alb)
x$protime<- log(x$protime)
x$copper<- log(x$copper)
x$ast<- log(x$ast)
test.bic.surv<- bic.surv(x, surv.t, cens, factor.type=FALSE, strict=FALSE)
summary(test.bic.surv)
Run the code above in your browser using DataLab