# \donttest{
set.seed(123)
data("gastric")
# Create intervals for piecewise exponential model
intervals <- divisionpoints(gastric$time, gastric$status, 2)
# Estimate model
mod <- shrinkDSM(time ~ radiation, gastric,
delta = gastric$status, S = intervals)
# Draw from posterior predictive distribution
newdata <- data.frame(radiation = c(0, 1))
pred <- predict(mod, newdata = newdata)
# Plot predictions
plot(pred)
# }
Run the code above in your browser using DataLab