[R] lmer refuses nested random factors

From: HENERY Martin <martin.henery_at_unifr.ch>
Date: Thu, 27 Nov 2008 13:29:01 +0100

I am trying to run the following model in R

> lmer(leaves.eaten~Geocytotype+(1|TEST/

My experimental setup is 41 replicates (TEST) of an experiment in which there are three Geocytotypes of a plant species in each TEST, and two plant pseudoreplicates per Geocytotype in each test (i.e. 3*2=6 plants per test). So my random factors are trying to examine/ account for variation between replicates and between pairs of plants in each test. The response variable is counts of damaged leaves on each plant hence the poisson distribution.

When I try and run the model I get this error message (sorry but it is in French):

>Erreur : length(f1) == length(f2) is not TRUE
>De plus : Warning messages:
> l'expression numérique a 246 éléments : seul le premier est utilisé
> l'expression numérique a 246 éléments : seul le premier est utilisé

This however is not connected as far as I can tell to the structure of the data because I checked the lengths of all the variables and if I run the same model design using lme function (without the family=poisson of course) and the model computes perfectly fine with the correct group sizes:

>Number of Observations: 246
>Number of Groups:
> 41 123

I couldn't find this error mentioned in any other posts on the list. Can someone enlighten me as to how to get around this intractable problem? My crude solution is to go around the obstacle by computing the mean of each plant pair and using a GLM with poisson distribution and ignore random effects.


Martin Henery

Post doctoral researcher
Département de Biologie/Ecologie & Evolution Université de Fribourg

        [[alternative HTML version deleted]]

R-help_at_r-project.org 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 Thu 27 Nov 2008 - 12:31:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 27 Nov 2008 - 14:30:29 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.

list of date sections of archive