Skip to content
Prev 82951 / 398502 Next

residual and null deviance of an lme object with correlation structure

To find generic functions with special methods written for objects of 
class "lme", I used "methods":

 > library(nlme)
 > methods(class="lme")
  [1] ACF.lme*              anova.lme             augPred.lme*
  [4] BIC.lme*              coef.lme*             comparePred.lme*
  [7] fitted.lme*           fixef.lme*            formula.lme*
[10] getData.lme*          getGroups.lme*        getGroupsFormula.lme*
[13] getResponse.lme*      getVarCov.lme*        intervals.lme*
[16] logLik.lme*           pairs.lme*            plot.lme
[19] predict.lme*          print.anova.lme*      print.lme*
[22] qqnorm.lme*           ranef.lme*            residuals.lme*
[25] simulate.lme          summary.lme*          update.lme*
[28] VarCorr.lme*          Variogram.lme*        vcov.lme*

    Non-visible functions are asterisked

	  At least in many contexts, the deviance is (-2)*log(likelihood).  If 
that is what you want, then (-2)*logLik.lme should get that for you, as 
with the following modification of the example from the documentation 
for logLik.lme:

 >      fm1 <- lme(distance ~ Sex * age, Orthodont, random = ~ age, 
method = "ML")
 > (-2)*logLik(fm1)
[1] 427.8060
...

	  hope this helps,
	  spencer graves
Corey Bradshaw wrote: