Example twinstim
Fit for the imdepi
Data
imdepifit.Rd
Usage
data("imdepifit")
Format
an object of class "twinstim"
See also
common methods for "twinstim"
fits,
exemplified using imdepifit
, e.g.,
summary.twinstim
, plot.twinstim
,
and simulate.twinstim
Examples
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))
}