 Dear all,

I'm running a model by using both lme () and lmer (), and are testing the
significance of two random effects (Year and ID). Earlier this year I found
a script that I've been using, and I do think that is proper. I have tried
to find references on how to state this result in a scientific paper. The
test and how I try to state the results are listed below (both 1. lmer ()
and 2. lme ()). My question is whether I've done it the right way? I do test
the same in both 1. lmer () and in 2. lme (), I've not decided whether to
stick to the lmer () or lme (). The benefit by using lme (), as far as
I know, is the opportunity to get p-values for the parameter estimates
and also using intervals ().

1. With lmer ()

lmerfit5<-lmer(log10(mass)~log10(age)+(1|ID)+(1|Year))
lmerfit6<-lmer(log10(mass)~log10(age)+(1|ID))
lmerfit7<-lmer(log10(mass)~log10(age)+(1|Year))
library(Matrix)
library(lattice)
options(show.signif.stars = FALSE)
anova(lmerfit5,lmerfit6)
anova(lmerfit5,lmerfit7)

> anova(lmerfit5,lmerfit6)
Data: Both
Models:
lmerfit6: log10(mass) ~ log10(age) + (1 | ID)
lmerfit5: log10(mass) ~ log10(age) + (1 | ID) + (1 | Year)
         Df     AIC     BIC  logLik Chisq Chi Df Pr(>Chisq)
lmerfit6  4 181.796 195.945 -86.898
lmerfit5  5 183.940 201.627 -86.970     0      1          1
> anova(lmerfit5,lmerfit7)
Data: Both
Models:
lmerfit7: log10(mass) ~ log10(age) + (1 | Year)
lmerfit5: log10(mass) ~ log10(ge) + (1 | ID) + (1 | Year)
         Df     AIC     BIC  logLik  Chisq Chi Df Pr(>Chisq)
lmerfit7  4 194.198 208.347 -93.099
lmerfit5  5 183.940 201.627 -86.970 12.258      1  0.0004633
Is this the right way to state the results: The random effect ID (likelihood
ratio test; c2=12.26, d.f.=1, p=0.0005)?

2. With lme ()

lmefit5<-lme(log10(weight)~log10(age), random = list(~1|Year,~1|ID))
lmefit12<-lme(log10(weight)~log10(age), random = ~1|Year)
lmefit14<-lme(log10(Mass)~log10(Age), random = ~1|ID)
library(Matrix)
library(lattice)
options(show.signif.stars = FALSE)
anova(lmefit5,lmefit12)
anova(lmefit5,lmefit14)

> anova(lmefit5,lmefit12)
         Model df      AIC      BIC    logLik   Test  L.Ratio p-value
lmefit5      1  5 188.9917 206.6389 -89.49587
lmefit12     2  4 199.0573 213.1750 -95.52864 1 vs 2 12.06553   5e-04
> anova(lmefit5,lmefit14)
         Model df      AIC      BIC    logLik   Test  L.Ratio p-value
lmefit5      1  5 188.9917 206.6389 -89.49587
lmefit14     2  4 188.1162 202.2339 -90.05811 1 vs 2 1.124488   0.289

Is this the right way to state the results: The random effect ID (likelihood
ratio test; p<0.0001)? Or should I also state the value L.Ratio?

Regards Cotter

	[[alternative HTML version deleted]]


