# \dontshow{
RcppArmadillo::armadillo_throttle_cores(2)
# }
data(idoveData)
set.seed(1234)
smp <- sample(1L:nrow(x = idoveData), size = 250L)
# NOTE: This sample size is chosen for example only -- larger data sets
# should be used.
# See the vignette for a full analysis of the idoveData dataset
# Fit the model with default settings
idove(formula = intCens(entry.time, left.time, right.time, vaccine.time) ~ 1,
data = idoveData[smp,])
# Specify Week 4 as the change point
# Assume a potentially waning VE after 4 weeks
# Estimate VE_a over 0-4, 4-16, 16-28, 28-40 weeks
idove(formula = intCens(entry.time, left.time, right.time, vaccine.time) ~ 1,
data = idoveData[smp,],
changePts = 4*7,
timePts = c(4, 16, 28, 40)*7)
# Specify multiple change points at Weeks 4 and 8
# Assume a constant VE after 8 weeks
idove(formula = intCens(entry.time, left.time, right.time, vaccine.time) ~ 1,
data = idoveData[smp,],
changePts = c(4, 8)*7,
constantVE = TRUE)
Run the code above in your browser using DataLab