[R] Pinheiro/Bates Soybean nlme failure
Douglas Bates
bates at stat.wisc.edu
Wed Jan 17 22:17:09 CET 2001
Prof Brian D Ripley <ripley at stats.ox.ac.uk> writes:
> On Wed, 17 Jan 2001, Dieter Menne wrote:
> > Somehow, R(1021, Windows) seem to run differently from S Plus:
> > The soybean example from Pinheiro/Bates on page 290 fails
> > in R. (Soybean1 is Soybean with the NA and "critical" case
> > removed. Same procedure with full Soybean).
> >
> > > fm1Soy.lis<-nlsList(weight~SSlogis(Time,Asym,xmid,scal),data=Soybean1)
> > > fm1Soy.nlme<-nlme(fm1Soy.lis)
> > Error: Singularity in backsolve at level 0, block 1
> > In addition: There were 50 or more warnings (use warnings() to see the first 50)
> > > warnings()
> > Warning messages:
> > 1: Singular precision matrix in level -1, block 1
> > 2: Singular precision matrix in level -1, block 1
>
> It is not the only such. nlme-3.1-x, x >=8 has a different algorithm and
> fails much more often for me than nlme-3.1-6, say. Both fail more
> often than nlme 3.3 on S-PLUS (you didn't say what you were using).
The failures in nlme-3.1-x occur, for the most part, on models that
are overparameterized and do not fit well. It is interesting to do
the model building for a nonlinear mixed-effects model by including a
random effect for each of the parameters in the per-subject model and
by allowing a general variance-covariance structure but that model is
often very difficult to estimate.
You may be able to fit this model using
fm1Soy.nlme <- nlme(fm1Soy.lis, random = pdDiag(Asym + xmid + scal ~ 1))
Even that fit is difficult because the random effects for Asym are
being used to model the systematic dependency of the Asymptote on the
Year and the Variety - behaviour that should properly be modelled in
the fixed-effects terms.
The nonlinear optimization codes used by S-PLUS and R are different.
There are advantages to the code used in R relative to the code used
in S-PLUS but there are also disadvantages. One of the disadvantages
is that the code in R will try very large steps during its initial
exploration phase then it gets trapped in remote regions of the
parameter space. For nlme this means that the estimate of the
variance-covariance matrix of the random effects becomes singular.
Recent versions of the nlme library for R have a subdirectory called
scripts that contains R scripts for the examples from each of the
chapters in our book. If you check them you will see that not all of
the nonlinear examples work in the R version of nlme. We plan to
modify the choice of starting estimates and the internal algorithms to
improve this but it is a long and laborious process. I ask for your
patience.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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