# NOT RUN {
sapply(split(ACF1$count,ACF1$endtime),var)
plot(count ~ endtime, data=ACF1, pch=16)
pause()
print("Poisson Regression - Example 8.3")
ACF.glm0 <- glm(formula = count ~ endtime, family = poisson, data = ACF1)
summary(ACF.glm0)
# Is there a quadratic effect?
pause()
ACF.glm <- glm(formula = count ~ endtime + I(endtime^2),
family = poisson, data = ACF1)
summary(ACF.glm)
# But is the data really Poisson? If not, try quasipoisson:
pause()
ACF.glm <- glm(formula = count ~ endtime + I(endtime^2),
family = quasipoisson, data = ACF1)
summary(ACF.glm)
# }
Run the code above in your browser using DataLab