Dear R-users,
I was doing some Poisson regression using the geepack package and I found a
"strange" behaviour of the geeglm command when defining an offset. Maybe
it's my limited knowledge of R syntax, or maybe it's something else.
Let's make an example. After loading the geepack library, you may write
model=geeglm(y~covariates+offset(log(xxx)),data=data,family=poisson,id=idx)
which is equivalent to
model=geeglm(y~covariates,offset=log(xxx),data=data,family=poisson,id=idx)
however, the command works also with the syntax
model=geeglm(y~covariates,offset(log(xxx)),data=data,family=poisson,id=idx)
giving different (wrong) results!
I discovered it because I was calculating some incidence rates by hand and
then comparing with the glm estimates. In the manual, indeed, the way in
which the offset should be written is not so easy to understand.
Thanks for any response,
Mattia Prosperi
--
View this message in context:
http://www.nabble.com/a-bug-in-the-offset-parameter-syntax-in-the-geepack-package--tp25047143p25047143.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.