Re: [R] residual and null deviance of an lme object with correlation structure

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Mon 19 Dec 2005 - 10:57:31 EST

          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:

> Hello,
>
> I am attempting to calculate the residual and null deviance of an lme
> object that includes a corAR1 correlation structure. I tried
> deviance(lme.object) and it only returned NULL. Can anyone help? Thank
> you.
>
> Corey Bradshaw
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves@pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Dec 19 11:08:56 2005

This archive was generated by hypermail 2.1.8 : Mon 19 Dec 2005 - 20:32:05 EST