Dear R-users, 

 

To obtain the percentage of deviance explained when fitting a gam model using 
the mgcv library is straightforward:

 

summary(object.gam) $dev.expl

 

or alternatively, using the deviance (deviance(object.gam)) of the null and the 
fitted models, and then using 1 minus the quotient of deviances. 

 

However, when a gamm (generalizad aditive mixed model) is fitted,  the deviance 
is not displayed, and only the logLik of the underlying lme model can be 
derived (logLik(objetct.gamm$lme)), which is not enough to derive the 
percentage deviance explained because the logLik for the saturated model is not 
available. 

Any suggestions on how to obtain the deviance explained when a gamm is fitted 
when the typical default gauusian model is fitted? Or alternavely, are the R^2 
derived from a gam model and a gamm model comparable?

 

Thanks a lot in advance,

Berta 

_________________________________________________________________
Descárgate ahora el nuevo Internet Explorer 8 y ten a tu alcance todos lo

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to