I've been having problems running update() to re-fit a cpglm model inside a function (as in the code below). The solution is probably simple, but I'm stuck. If anyone could help, I'd greatly appreciate it.
## R code
## Data simulation