[R] mixed effects models with nested factors

From: Luis Cayuela <luis.cayuela_at_uah.es>
Date: Thu, 15 May 2008 16:22:11 +0200

Hi everybody,  

I am trying to fit a model with the lmer function for mixed effects. I have an experimental design consisting of 5 field plots. Each plot is divided in 12 subplots where the influence of three factors on the growing of tree seedlings is tested: (1) seed (1 = presence; 0 = absence); (2) seedling species (oak holm vs. pine); (3) treatment (three different treatments). In each of these subplots we planted 13 seedlings. Therefore I would have a model with three fixed factors and one random factor (a block?). If I´m not wrong the model would be as follows:  

model2 <- lmer(Growing ~ Seed + Species + Treatment +(Seed + Species + Treatment|Block), data)  

My first question is: if the three fixed factors occur within-subjects (considering the plot as a subject), is the model correctly defined (assuming no interactions)? Should I specify the model in some other way?  

I second problem I had is that the factors are not crossed because some of the seedling died during the experiment. This means that some factors are nested. Specifically Species is nested within Seed and Block would be nested within Treatment. I have tried to use the %in% specification for nested designs but it does not work.  

model2 <- lmer(Growing ~ Seed + Species%in%Seed + Treatment +(Seed + Species + Treatment|Block%in%Treatment), data)  

I get the following error:  

Error en lmer(Growing ~ Seed + Species %in% Seed + Treatment + : ..

  Leading minor of order 5 in downdated X'X is not positive definite  

I would appreciate some help to fit this model.

Thanks to everybody,


Luis Cayuela
Departamento de Ecología
Universidad de Alcalá
Crta. de Barcelona km. 33,600
E-28871 Alcalá de Henares
Tlf: (+0034) 918856407
Fax: (+0034) 918854929

        [[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 15 May 2008 - 20:35:47 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 Wed 21 May 2008 - 13:30:38 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