data(SampleData)
newdata <- transdata(data = SampleData, ndlevel = 3, nexposure = c(10, 10, 2))
#interaction between the hightest dose level and treatment assignment
#under the discrete-time survival model with random effects
fitout1 <- rld(formula = survival::Surv(time, delta)~factor(dose)+trt+I(I(dose==3)*trt),
data = newdata, frailty = TRUE)
#summary(fitout1)
## Not run:
# #main effects model without random effectss
# ini <- rep(0.5, 4)
# lwr <- rep(-Inf, 4)
# upr <- rep(Inf, 4)
#
# fitout2 <- rld(formula = survival::Surv(time, delta)~factor(dose)+trt,
# initial = ini, lower = lwr, upper = upr, data = newdata,
# frailty = FALSE)
# #summary(fitout2)
# ## End(Not run)
Run the code above in your browser using DataLab