[R] lme problem ?

Douglas Bates bates at stat.wisc.edu
Wed Jun 2 22:38:46 CEST 1999

"Troels Ring" <tring at mail1.stofanet.dk> writes:

> Dear friends. I tried the session below with 10 MB in both vsize and
> nsize but didn't get the example work. Is this a problem in LME or
> in me or both or somewhere else or undefined ?

> > library(lme)
> > data(Orthodont)
> > fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
> Error: Singularity in backsolve at level 2, block 1> 
> > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
> Error: singular matrix in chol

That looks to me like a relatively old version of lme.  I would
suggest installing a new version.  Your example works fine with the
"lme du jour" which is version 3.0b8-1, available at the CRAN sites in
the src/contrib directory.

 R> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
 R> fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
 R> gc()           # check amounts of storage in use
	   free   total
 Ncells  575483  800000
 Vcells 2015987 2097152

I'm currently working on the 3.0b8a version that corrects some minor
gliches in 3.0b8 and enhances the nls capabilities.  I hope to upload
that tomorrow.

This is as good a time as any to announce that we uploaded an nls
(nonlinear least squares) package for R last weekend.  For historical
reasons the nls package requires that you have the lme package
installed.  Many of the enhancements to nls for S were written as part
of the NLME library and the R version of NLME is the lme package.
(Now that I write this all out it doesn't make as much sense as it
seemed to earlier but ...)

There is also a package for R called NISTnls.  This package includes
the data and models for the nonlinear least squares examples at the
U.S. National Institute for Standards and Technology (NIST).  By
running the examples in that package you can check the nls function
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list