Skip to content
Prev 18187 / 20628 Next

model check for negative binomial model

That's correct.  There are some delicate issues about prediction:

* do you want to use the original (potentially unbalanced) data for
prediction? (That's what you're doing here).
* or, do you want to make predictions for a "typical" nest and week
combination, in which case you would use


  pframe <- with(your_data,
        expand.grid(Relocation..Y.N.=unique(Relocation..Y.N.),
            SP=unique(SP))
  predict(m.unhatched,type="response",re.form=NA,newdata=pframe))

  You could also use expand.grid() to generate a balanced design (i.e.
all combinations of weeks and nests), which would give yet another answer.

  There are a lot of packages designed for doing these kinds of
post-fitting manipulations (e.g. 'margins', 'emmeans'), you might find
them useful ...
On 2020-02-17 1:48 p.m., Alessandra Bielli wrote: