[R] NLME

Dieter Menne dieter.menne at menne-biomed.de
Wed Nov 2 11:15:34 CET 2005


Guy Forrester <ForresterG <at> landcareresearch.co.nz> writes:

> R : Copyright 2005, The R Foundation for Statistical Computing
> Version 2.1.1  (2005-06-20), ISBN 3-900051-07-0

>  Jose Pinheiro, Douglas Bates, Saikat DebRoy and Deepayan Sarkar (2005). 
...
> I am trying to run the scripts from the Mixed Models book and am running into 
some difficulty - could any one
> tell me why this doesn't work (from pages 369 - 370) 
> 
>  
> CO2  #FINE
> plot(CO2,outer= ~Treatment*Type,layout=c(4,1)) #FINE

These examples were written for S; until version 2.1.1 (the version you are 
using) the optimizing engine for R was different from S, and some of the 
examples did not work. Consult the nlme/scripts, were the non-converging parts 
are commented out.

>From 2.2.0, the R/s engines should be similar, so if you update the examples 
from the book should run. My mileage varied, however:

After installing R 2.2.0 (Windows), I immediately tried to run the ping-pong 
examples in ch06.R and ch08.R, because I had encountered quite few of these in 
my own stuff.

fm1Quin.nlme works now.

Strangely, fm2Pheno.nlme still plays merry-go-round. However, when I changed 
pnlsTol to 0.1, it worked. The results were close to those published, but not 
exactly the same. I did not try this in previous versions, maybe it would have 
worked there too with this modification.

Dieter




More information about the R-help mailing list