Dear Mixed Modellers,
I'm doing some preliminary analyses on a large dataset (~40000 records)
of tree stem abundance across ~800 species and 47 plots. I've come across
some errors and warnings that I'd like to avoid.

Since the plots are completely censussed, the dataset also contains absences
(in fact most entries are zero). I'm trying to find which species-level and
plot-level traits are correlated with abundance. The basic random effects
model is:

RE.mod <- glmer(stems ~ (1|Species) + (1|Plot), data, family=poisson,
offset=log(area), verb=T)

At this stage, I want to run a set of preliminary models to look at the each
fixed effect in turn. Unfortunately, most have missing values. Some of the
predicted relationships are
curvilinear, so I comparing linear and polynomial fits. So my procedure is
as follows:

1) Look through each variable: for (i in a:b){
2) Subset the data: subset<-data[!is.na(data[,i]),] # this is necessary
because poly() spits an error when there are missing data
3) Refit the RE model above: model0 <- update(RE.mod, data=subset) # I need
something to compare with later models
4) Add the fixed effect of interest: model1 <- update(model1,
as.formula(sub("~",paste("~",names(data)[i],"+"),model0@call[2])),
data=subset)
5) Add the polynomial term: model2 <- update(model0,
as.formula(sub("~",paste("~poly(",names(data[i]),",",p,")+"), model0@call
[2]))

This is rather slow and often breaks (certain models fail to converge). So I
decided to speed things up by starting the model using the parameter values
from the previous step and setting the new parameter (where appropriate) to
zero:

model0 <- update(..., start=list(ST=RE.mod@ST, fixef=RE.mod@fixef)
model1 <- update(..., start=list(ST=model0@ST, fixef=c(model0@fixef,0))
model2 <- update(..., start=list(ST=model1@ST, fixef=c(model1@fixef,0))

This indeed increases the speed at which models are fit. However, there are
two distinct problems:

1: Every single model produces the following warning, which I do not
understand:
In sort(names(start)) == sort(names(FL)) :
  longer object length is not a multiple of shorter object length
*Should I be worried about this? If not, can I suppress this warning without
suppressing others?*

2. A small number of the basic fixed effect models (model 1) fall over with
the following error:
CHOLMOD warning: dxż,
Error in mer_finalize(ans) :
  Cholmod error `matrix not positive definite' at
file:../Supernodal/t_cholmod_super_numeric.c, line 613
I've seen reports of several cholmod errors on this list, but nothing like
this one. I get the same thing if I set different start values for fixef.
The model runs fine when the start argument is omitted.

Finally, whilst I've noticed a general tendency for the speed to increase as
a result of specifying 'start', this is not always the
case. Are there any general principles here?

Any insight gratefully received.

Best wishes, Nick

--------

R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1

locale:
en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] gdata_2.4.2        lme4_0.999375-32   Matrix_0.999375-30 lattice_0.17-25


loaded via a namespace (and not attached):
[1] grid_2.9.1   gtools_2.6.1

	[[alternative HTML version deleted]]


