# [R] question about lmer--different answers from different versions of R?

From: Feldman, Tracy <tsfeldman_at_noble.org>
Date: Tue 28 Feb 2006 - 01:52:47 EST

To whom it may concern:

I am using lmer for a statistical model that includes non-normally distributed data and random effects. I used this same function in the most recent version of R as of fall 2005, and have re-done some of the same analyses using all of the same files, but with the newest version of R (2.2.1). I get answers that are not exactly the same (although I do get the same general patterns of significance). Is there any reason why an updated version of lmer in R would give different answers than the same function in a previous version? See example below.

Sincerely,

Tracy S. Feldman

Postdoc, The Samuel Roberts Noble Foundation

Example:

The model formulas (same in both):

fitvisit1.1<-lmer(visitsR~dist + ctrt + (1|rep) + (1|field), family = poisson, method = "ML")

fitvisit1.3<-lmer(visitsR~dist + (1|rep) + (1|field), family = poisson, method = "ML")

Done in fall 2005 (I forget the most recent version then):

> anova(fitvisit1.1, fitvisit1.3, test = "Chisq")

Data:

Models:

fitvisit1.3: visitsR ~ dist + (1 | rep) + (1 | field)

fitvisit1.1: visitsR ~ dist + ctrt + (1 | rep) + (1 | field)

Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)

fitvisit1.3 7 855.11 878.74 -420.56

fitvisit1.1 8 856.63 883.63 -420.31 0.4856 1 0.4859

Done in Feb 2006 (in R 2.2.1):

> anova(fitvisit1.1, fitvisit1.3, test = "Chisq")

Data:

Models:

fitvisit1.3: visitsR ~ dist + (1 | rep) + (1 | field)

fitvisit1.1: visitsR ~ dist + ctrt + (1 | rep) + (1 | field)

Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)

fitvisit1.3 6 875.04 895.29 -431.52

fitvisit1.1 7 876.69 900.32 -431.35 0.3487 1 0.5549

[[alternative HTML version deleted]]

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 Tue Feb 28 02:04:38 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:45 EST