Dear r-sig-mixed-models webmail list members,

I am new in the mixed-effects models world and I am learning from Faraway's
and Pinheiro & Bates' books and also from this list.
I have 3, very straightforward, questions, but first a brief summary of my
analysis objectives. I am trying to analyze my data with mixed effects
models where the fixed factor is represented by altitudinal transects (4
transects, where T4 is treeline, and T1, T2 and T3 are below treeline). In
each altitudinal transect I collected tissue samples from different
age-class trees (a categorical variable with 4 levels, I, II, III, and IV);
all this with the main objective to compare specific leaf area -SLA- of the
treeline trees with lower elevation transects, and take into account the
age-class of the tree being considered. The data set is very unbalanced and
reading similar papers I concluded that age-class should be considered a
random factor nested in transects.

*Question 1*: am I correct by considering age-class a random factor nested
within transect? If so, what should be the way to code the model?
My suggestion is:
> sla.termas = lmer(SLA ~ 1 + Transect + (1|Transect:Age),
data=Treeline[Site=="TermasChillan",], na.action=na.omit) or
> sla.termas = lmer(SLA ~ 1 + Transect + (Transect|Age),
data=Treeline[Site=="TermasChillan",], na.action=na.omit), but I am not
sure.


In my learning process I followed examples given in Faraway's book and just
for learning purposes I computed my model in the way he does (considering
both factors random) and got, for some, variables the following warning
message:

> sla.termas = lmer(SLA ~ 1 + (1|Transect) + (1|Transect:Age),
data=Treeline[Site=="TermasChillan",], na.action=na.omit)
*Warning message: In .local(x, ..., value) :
  Estimated variance-covariance for factor 'Age' is singular*

This is not good when I try to test the significance of the variation among
ages by ANOVA, since I get a Pr(>Chisq)=1; something must be wrong. This
situation happens with some variables and not with all of them: strange?

*Question 2*: any idea why this happens? What am I doing wrong?

When I do get the model run (no such a warning message and just for some
other variables) and compare this model with a reduced version (without the
nested random factor, e.g., age-class) I run anova and get a p-value. As
suggested by Faraway I should also go for a p-value computing LRT 1000 times
(less conservative cf. Faraway) and most of the time I get the following
message:

> lrstat = numeric(1000)
> for(i in 1:1000){
+ rSLA = unlist(simulate(sla.termas2))
+ nmod =
lmer(rSLA~1+(1|Transect),data=Treeline[Site=="TermasChillan",],na.action=na.omit)
+ amod =
lmer(rSLA~1+(1|Transect)+(1|Transect:Age),data=Treeline[Site=="TermasChillan",],na.action=na.omit)
+ lrstat[i] = 2*(logLik(amod)-logLik(nmod))
+ }
*Error in model.frame.default(data = Treeline[Site == "TermasChillan",  :
  variable lengths differ (found for 'Transect')*

*Question 3*: any idea why this happens? What am I doing wrong? I made an
artificial balanced data set to see whether the unbalanced situation was the
responsible for this message but it was not.

I am new in the mixed-effects models world but I want to learn; your
comments and advice will be greatly appreciated. Cheers,



-- 
Alex Fajardo, PhD
Investigador Asociado
Centro de Investigación en Ecosistemas de la Patagonia
Bilbao 449. Coyhaique, CHILE
Telefonos: 56-67-244503; (56) 8-4506354
Fax: 56-67-244501
alex.fajardo@ciep.cl

	[[alternative HTML version deleted]]


