Re: [R] glm.nb and Error in x[good, , drop = FALSE] * w : non-conformable arrays

2023-04-21 Thread Patrick Giraudoux
Many thanks Ivan ! This is fairly clear to me, now... When I dumped the data.frame, I found strange to have a "table" declaration for deg, but was not able to judge if it was a problem or not (I would have expected something as "numeric") Your workaround is fine to me (I do not need to carry on

Re: [R] glm.nb and Error in x[good, , drop = FALSE] * w : non-conformable arrays

2023-04-21 Thread Ivan Krylov
On Fri, 21 Apr 2023 09:02:37 +0200 Patrick Giraudoux wrote: > I meet an error with glm.nb that I cannot explain the origin (and > find a fix). The model I want to fit is the following: > > library(MASS) > > glm.nb(deg~offset(log(durobs))+zone,data=db) > > and the data.frame is dumped below. T

[R] glm.nb and Error in x[good, , drop = FALSE] * w : non-conformable arrays

2023-04-21 Thread Patrick Giraudoux
Dear Listers, I meet an error with glm.nb that I cannot explain the origin (and find a fix). The model I want to fit is the following: library(MASS) glm.nb(deg~offset(log(durobs))+zone,data=db) and the data.frame is dumped below. Has anyone an idea about what the trouble comes from ? (except