[R] nlme R vs S plus

Evelyn Hall ewhi4239 at mail.usyd.edu.au
Thu Aug 19 06:23:23 CEST 2004


Hi all,

I'm a PhD student at sydney uni and am trying to run a non linear mixed
model program to obtain estimates of parameters describing dairy cow
lactation curves. At present, I have been able to get the data to converge
using the S plus (S plus 2000) nlme function.  However, when I put the same
data into R (R 1.9.0), add in the nlme package and run the code, it does
not converge by the max 50 iterations. Is this because the nlme function
is slightly different and if so, is there a way to solve this problem?

The code I am using is below:

W3<-deriv(~A*ti^exp(logB)*exp(-exp(logC)*ti),c("A","logB","logC"),
function(ti,A,logB,logC){})

Lact.nlme<-{nlme(model=MLKYLD~W3(DIM,A,logB,logC),
	fixed=A+logB+logC~1,
	random=A+logB+logC~1|ID,
  
	data=LacData.x0,					start=c(13.41143,log(0.152792),log(0.002494)),			control=nlmeControl(msMaxIter=200),
   	verbose=T)
   	}
Any help or advice would be greatly appreciated,

Evelyn

--
Evelyn Hall
PhD Student
Faculty of Veterinary Science
C01 JL Shute Building Camden
University of Sydney




More information about the R-help mailing list