[R] lme(nlme) error message

Douglas Bates bates at stat.wisc.edu
Tue Mar 16 14:57:48 CET 2004


"J Fu" <j.fu at cs.rug.nl> writes:

> I am writing to seek any help on "lme" error message. I am using lme
> to do Mixed-model linear regression. I use my simulated
> data. However, sometimes, I get the following error message, which I
> do not understand.
> 
> "Error in solve.default(pdMatrix(a, fact=TRUE)): system is computationally sigular"
> 
> I would appreciate any help about it.

This is usually an indication that the model is overfitting the data,
which is not an unusual situation for simulated data.  A simple
example would be a variance component model being simulated under the
null hypothesis that the variance component for the random effects is
zero.  In a large proportion of the cases (roughly half) the simulated
data will be such that the MLE and REML estimates of the variance
component are exactly zero.  The code that is failing is trying to
invert the factor of the relative variance-covariance matrix, which is
approaching singularity.

You could wrap your call to lme in try() or tryCatch() so you can
detect the situations where lme fails to converge and decide what to
do with them.

-- 
Douglas Bates                            bates at stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/




More information about the R-help mailing list