[R] Predicted values when using offset in ZIP GLM
Achim.Zeileis at uibk.ac.at
Thu Jul 12 23:04:44 CEST 2012
On Thu, 12 Jul 2012, Lee, Laura wrote:
> Hi all!
> I have built a model to predict interactions with turtles and the model
> includes an offset for effort:
Note that this includes the offset both in the count component and in the
zero inflation component. The latter is probably not desired. (As Alain
already previously pointed out in one of hise e-mails.)
For specifying the offset only in the count component you can do either
Sturgeon ~ fMesh + fSeason + offset(LogEffort) | fMesh + fSeason
Sturgeon ~ fMesh + fSeason, offset = LogEffort
However, it may be useful to include LogEffort as a regular variable (not
an offset) in the inflation component as well...
> I wasn't clear about one aspect of the response to a similar question I
> recently posted...I apply the predicted model to a new dataset of
> standard conditions and take the sum to get the total predicted numbers
> of bycatch:
> Do I first need to exponentiate before taking the sum as in:
No. predict(..., type = "response") computes the expected mean of the
response (as previously pointed out here and as clearly stated in the
> Thanks again in advance!
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help