data(imdepi)
data(imdepifit)
## simple baseline model
m0 <- update(imdepifit, epidemic = ~1, siaf=NULL, cumCIF=FALSE,
start=c("e.(Intercept)"=-16))
## AIC-based step-wise backward selection of the endemic component
m0_step <- stepComponent(m0, "endemic", scope=list(lower=~I(start/365)))
## nothing is dropped from the model
m0_step$anova <- NULL
stopifnot(identical(m0, m0_step))
Run the code above in your browser using DataLab