[R-sig-ME] R2admb-package

Ben Bolker bbolker at gmail.com
Tue Jul 1 23:03:02 CEST 2014


 [cc'ing to R-sig-mixed-models]

  There appears to be a deviance() method for 'admb' objects (produced
by R2ADMB), but not for 'glmmadmb" objects (produced by glmmADMB).
However, you should be able to use -2*logLik(object) to obtain the
deviance (to be precise, -2*logLik(object) is equal to the deviance in
general only _up to an additive constant_, but I think this workaround
will be OK for your purposes).

  Ben Bolker


On 14-07-01 07:10 AM, Elena Guerrero wrote:
> Dear Ben Bolker,
> 
> I have run a glmmADMB model to my count data with a family = "nbinom" .
> It worked very nice.
> 
> Now I want to calculate the *deviance explained* by this model
> (100*(Null deviance-Residual deviance)/Null deviance). I installed the
> R2admb package to use the deviance() function, however when I write
> deviance(my model) R gives me "NULL" as a response. When I try with the
> "admbex" example it works perfectly.
> 
> What is it happening? What does mean NULL in this case? Is there any
> other way to obtain the explained deviance of a glmmADMB model?
> 
> Thank you very much in advance.
> Best regards,
> Elena
> 
> -- 
> --
> Elena Guerrero Sánchez-Guerrero
> PhD student
> Dept. Biologia Marina i Oceanografia
> INSTITUTO DE CIENCIAS DEL MAR - CSIC
> Pg. Marítim de la Barceloneta, 37-49
> 08003 BARCELONA
> Spain
> Phone:(+34) 93 230 95 00 (ext. 1209)
> Fax: (+34) 93 230 95 55 
> http://www.icm.csic.es/icmdivulga/es/mediterraneo-monograficos-08.htm
> http://www.icm.csic.es/bio/
>



More information about the R-sig-mixed-models mailing list