if (surveillance.options("allExamples"))
{
data(imdepi)
data(imdepifit)
## enrich the fit by the model environment
imdepifit <- update(imdepifit, model=TRUE)
## this enables, e.g., intensityplot()s and untrimmed R0 estimates
## add another epidemic covariate
imdepifit2 <- update(imdepifit, epidemic = ~. + log(popdensity),
# must also update vector of start values!
optim.args=list(par=c(head(coef(imdepifit),-1),0,tail(coef(imdepifit),1)),
fixed="e.siaf.1"), # for reasons of speed
cumCIF=FALSE)
## compare with AIC
AIC(imdepifit, imdepifit2)
}
Run the code above in your browser using DataLab