Re: [R] latex and anova.lme problem

From: Richard M. Heiberger <rmh_at_temple.edu>
Date: Sun 08 Oct 2006 - 17:08:53 GMT


It works for me. I am also using R-2.4.0

> library(Hmisc)
> library(nlme)
> ?lme
> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
> fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
> anova(fm1,fm2)

    Model df      AIC      BIC    logLik   Test  L.Ratio p-value
fm1     1  6 454.6367 470.6173 -221.3183                        
fm2     2  5 447.5125 460.7823 -218.7562 1 vs 2 5.124178  0.0236
Warning message:
Fitted objects with different fixed effects. REML comparisons are not meaningful. in: anova.lme (fm1, fm2)
>
> fm1f <- lme(distance ~ age+Sex, data = Orthodont) ## to avoid above warning message
> anova(fm1f,fm2)
     Model df      AIC      BIC    logLik   Test  L.Ratio p-value
fm1f     1 10 453.6604 480.2000 -216.8302                        
fm2      2  5 447.5125 460.7823 -218.7562 1 vs 2 3.852152  0.5709

> tmp.lme <- latex(anova(fm1f,fm2))
> getwd() ## to find out where the anova.tex file was placed.

Therefore it is necessary for you to
 "provide commented, minimal, self-contained, reproducible code."

Rich



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 and provide commented, minimal, self-contained, reproducible code. Received on Mon Oct 09 03:11:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 08 Oct 2006 - 17:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.