ahnven
2009-Aug-19 16:07 UTC
[R] a bug in the offset parameter syntax in the geepack package?
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.
ahnven
2009-Aug-20 13:24 UTC
[R] a bug in the offset parameter syntax in the geepack package?
I found that the syntax ahnven wrote:> > > model=geeglm(y~covariates,offset(log(xxx)),data=data,family=poisson,id=idx) > >indeed fits offset(log(xxx)) as weights. -- View this message in context: http://www.nabble.com/a-bug-in-the-offset-parameter-syntax-in-the-geepack-package--tp25047143p25061988.html Sent from the R help mailing list archive at Nabble.com.
Seemingly Similar Threads
- geepack installation problem?
- using step() with package geepack
- gee with auto-regressive correlation structure (AR-M)
- Could generic functions check different S3 methods for an object when one of them produces an error?
- different fits for geese and geeglm in geepack?