data("imdepi", "imdepifit")
if (FALSE) {
## reproduce "imdepifit"
myimdepifit <- twinstim(
endemic = addSeason2formula(~ offset(log(popdensity)) + I(start/365-3.5),
S = 1, period = 365, timevar = "start"),
epidemic = ~ type + agegrp, siaf = siaf.gaussian(),
data = imdepi, subset = !is.na(agegrp),
optim.args = list(control = list(reltol = sqrt(.Machine$double.eps))),
## the historical default for reltol is 1e-6, which is rather large
model = FALSE, cumCIF = FALSE
)
stopifnot(all.equal(imdepifit, myimdepifit))
}
Run the code above in your browser using DataLab