[R-sig-eco] problems with get.models fuinction (MuMIn package)
Alex
alex at iim.csic.es
Tue Nov 24 18:27:54 CET 2015
Dear all,
I am running a catch rate estandardization of fishery dependent data
using a ZINB model with an offset like this:
>globalM<-zeroinfl(Ntot~offset(log(Effort))+ year+zone+year:zone+day |
Depth,
> dist="negbin",link="logit",data=DAT)
I am exploring model averaging methods with the MuMIn library
(MuMIn_1.13.4 in R version 3.1.2).
To date I was able to obtain model averaging estimates of model
parameters doing the following:
>sfM1 <- dredge(globalM,fixed="count_offset(log(Effort))")
>avgmod.95p <- model.avg(sfM1, cumsum(weight) <= .95)
>confint(avgmod.95p)
>avgm <- model.avg(sfM1, cumsum(weight) <= .95)
But I am getting problems with predict function.
Until I understood the function predict(object,..) needs the "modelList"
attribute stored in the "model.selection" object and this should be done
with the function get.models().
But, this is the error message that I have got when :
>confset.95p <- get.models(sfM1, cumsum(weight) <= .95,fit=TRUE)
Error in eval(expr, envir, enclos) :
argument "offset" is missing, with no default
Any help with this? I would really appreciate it.
Many thanks,
--
*Alexandre Alonso Fernández, PhD*
Institute of Marine Research, IIM-CSIC
Departamentof Marine Ecology and Resources
Fisheries Ecology unit
<https://twitter.com/FisheriesIIM>
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list