[R] Error in mer_finalize(ans) : Downdated X'X is not positive definite, 8.

Ben Bolker bbolker at gmail.com
Sat Jan 19 21:37:34 CET 2013


Yoav Avneon <Avneony <at> bgu.ac.il> writes:

> I have conducted an experiment in order to examine predation pressure in the
> surroundings of potential wildlife road-crossing structures.  I have
> documented predation occurrence (binary…) in these structures and calculated
> several possible explanatory variables describing the spatial heterogeneity
> in several scales.  At the landscape scale I have calculated the percentage
> of different land-uses (7) in buffers around the structures with changing
> radii (100m, 250m, 500m, 1000m and 2000m).  For each radii I have generated
> a set of all possible models from the given 7 variables related to this
> radii.    
> I have tried to account for random effects. A spatial random effect – the
> structure itself as a repeated measurement, by adding the term
> (1|Road_Structure).  A temporal random effect – the observation session (is
> it correct to say that this examines possible learning in time ?), by adding
> the term (1|Session.ord).   
> I have generated 4 sets for each radii: 1) with both random effects, 2+3)
> only one (each) random effect, and 4) none.    
> I have tried to model the relationships using glm, glmer and lmer.
> The problem is that in the full model (all 7 variables) of some sets with
> random effects I get the following error:
> *Error in mer_finalize(ans) : Downdated X'X is not positive definite, 8.*
> 
> The only record of this error I have found in the internet is for data with
> missing observation.  This doesn't comply with my data set.  I think it
> might be a singularity problem but I don't know how to check it, and as a
> result, I obviously don't know how to fix it.
> I have attached example R scripts (for the radius 2000) and the data table.
> Any help is highly appreciated !
> Thanks and all the best,

  Questions like this (and follow-ups) should probably go to
r-sig-mixed-models at r-project.org.

  I don't have time to dig into this in detail, but I would start
by (1) centering and scaling all of your variables (see ?scale, and
Schielzeth 2010 _Methods in Ecology and Evolution_ and (2) checking
the correlations among your variables; if they are strongly correlated
you have lots of options (none of them perfect), much discussed on
the internet, including discarding some variables or using PCA.



More information about the R-help mailing list