[R-sig-ME] Fwd: Mixed model with nested random effect and repeated measures

Diogo B. Provete dbprovete at gmail.com
Tue May 14 22:55:28 CEST 2013


Dear list,
I have an issue with the design of an experiment. I am to analyze the data
from this experiment that manipulated three levels of species richness and
wanted to see the effects of it on several freshwater ecosystem functioning
(productivity, decomposition, respiration).
The author also nested 7 different species composition within each
treatment. Each of these 7 was replicated twice (see figure attached) by
randomly taking species from a species pool with a total 21 species.
 I want to use phylogenetic diversity (a continuous variable) as a
predictor of each ecosystem functioning, instead of species richness.
However, since there are 7 different species compositition nested within
each species richness treatment, this yields 7 different values od
phylogenetic diversities for each treatment.
Additionally, the author also took 6 measurements of each ecosystem
functioning throughout the experiment.

I've tried to run a mixed model and specify the nested design for the
random effect (phylogenetic diversity) in lme4, but I'm getting an error.

My data is like (see whole dada attached):
*tank* *treat* *comp*     * PD* *div* time *prod*
1   18     1    1  2141.15    1    1 0.259
2   60     1    1  2141.15    1    1  0.269
3   20     4    1  2141.15    1    1  0.299
4   58     4    1  2141.15    1    1  0.294
5   18     1    1  2141.15    1    2  0.244
6   60     1    1  2141.15    1    2  0.295

Where PD = phylogenetic diversity; div=diversity; prod=productivity; tank=
the cattle tank (sampling unit); treat=treatments

The model I've tried to run with the nested factors is:

m1 <- lmer(prod ~ factor(div)*factor(time) + factor(div)+ factor(time) +
(1|comp) + (factor(PD)/factor(tank)/factor(time)), data = dados)

The error is:
Error in mer_finalize(ans) : Downdated X'X is not positive definite, 21.

I really appreciate with anyone could help me with this. I have also
attached a cartoon explaining the experimental design.

-- 
Atenciosamente,
*Diogo Borges Provete*

==============================
Biólogo
Mestre em Biologia Animal (UNESP <http://www.ibilce.unesp.br>)
Doutorando PPG Ecologia e Evolução <http://www.ecoevol.ufg.br>
Laboratório de Ecologia de Insetos (sl. 222)
Departamento de Ecologia <http://www.icb.ufg.br/pages/18570>
Instituto de Ciências Biológicas <http://www.icb.ufg.br> - ICB 1
Universidade Federal de Goiás <http://www.ufg.br>, campus II
Goiânia-GO
74001-970
Brazil

Tel. Lab. +55 62 3521-1732
*Cel. +55 *62 8231-5775
*
*: diogoprovete

*Personal web page <http://diogoprovete.weebly.com>*

Editor Herpetology
Notes<http://www.herpetologynotes.seh-herpetology.org/index.html>

NorthWestern Journal of Zoology<http://biozoojournals.3x.ro/nwjz/index.html>
==============================


More information about the R-sig-mixed-models mailing list