Skip to content
Prev 4878 / 20628 Next

problem using geeglm: R keeps crashing

On 10-11-28 07:17 PM, Chris Howden wrote:
It has showed up (I think three times including this one): you can
always check the archive at
<https://stat.ethz.ch/pipermail/r-sig-mixed-models/> to see if your
messages get through).
In general if a package crashes R, that by definition constitutes a
bug in the package and should be reported to the maintainers -- but see
below ...
Based on my reading of ?geeglm, and this note under the "id" argument
description: "Data are assumed to be sorted so that observations on a
cluster are contiguous rows for all entities in the formula."  Thus I
would not be surprised if the example you give above failed, because it
violates the rules laid out in the documentation (on the other hand,
this is pretty easy to check and it would be wise for the package
authors to make their code a bit more "fool-resistant" by checking for
this condition and throwing an error if the elements aren't properly
sorted).
  You can easily sort your observations by id to make them conform to
the rules, or, if you want to fit each contiguous block separately, you
can use something like

factor(c(0,cumsum(diff(as.numeric(id))!=0)))

to generate a new id variable that identifies contiguous blocks.
 Given all this it seems really surprising that geeglm works with
permuted data.  Does it work consistently (say 10 or 20 times in a row)
and give the same answers for different permutations ... ? Maybe you
just got lucky.

  (It would also seem pretty dicey to me to run a random effects model
with only 4 levels (animals), although if you do want to use 'bout'
(contiguous block) as the id variable you will have a lot more levels ...)