[R-sig-ME] can't get model to converge

Rubén Roa rroa at azti.es
Tue Jul 13 08:15:43 CEST 2010


> -----Mensaje original-----
> De: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] En nombre 
> de Michael Larkin
> Enviado el: martes, 13 de julio de 2010 5:06
> Para: r-sig-mixed-models at r-project.org
> Asunto: [R-sig-ME] can't get model to converge
> 
> I know my convergence problem is not a new one to this email 
> list.  I looked at old post and I still can't figure out my 
> problem.  This is why I am sending this email.  
> 
> Here is my situation:  
> 
> I have back-calculated fish growth using otoliths (ear 
> bones).  In a nutshell you can back calculate the length of 
> the fish at each age by measuring the distance from the core 
> of the otolith to each annuli and the edge of the otolith.  
> Since the data is longitudinal, autocorrelated, and 
> unbalanced the best way to generate a growth curve is using a 
> non-linear mixed effect model (Vigliola and Meekan 2009).  
> 
> I have three columns of data: fish identification number 
> (id), length at age (L), and incremental age (Age).  
> 
> Here is my code:  
> 
> #first I create my growth model which is the von Bertalanffy 
> growth model
> (LVB)
> 
> >LVB=function(x,t0,Lmax,K){                                   
> >y=Lmax*(1-exp(-K*(x-t0)))
> >y
> >}
> #I define the groups for the mixed effect model.  
> >datagr=groupedData(L~Age|id,data=back)
> #The next step fits a von Bertalanffy growth model by 
> non-linear mixed effect model.  
> >LVB.nlme=nlme(L~LVB(Age,t0,Lmax,K), data=datagr,
> >fixed=list(t0~1,Lmax~1,K~1),         #The model is 
> estimating global values
> for all three parameters. 
> >random=t0+Lmax+K~1,                  #The model is 
> estimating values for
> each parameter for 
> each individual fish.  This is the random effect part of the model.  
> >start=list(fixed=c(t0=-1, Lmax=700, K=0.2)))         #list 
> creates a list
> of the arguments, fixed means 1 single fixed effect, c means 
> create a data vector.  
> 
> I keep getting the error of "Maximum number of iterations".  
> I have tried different starting values and still have no 
> luck.  I even tried 
> 
> increasing the number of iterations to 1,000 using nlmeControl.  
> 
> Any advice on how to get my model to converge would be 
> greatly appreciated.
> 
> Mike 

Michael,

I think you can tell with some certainty the initial length of your fish, the length at birth.
They all are born pretty small and the variance of this length at birth is very small anayway (at least from a human perspective). If you can fix that value, call it l_0, then a re-parameterised version of your model is

L_t = L_infinity(1-(1-l_0/l_infinity)*exp(-K*t)))

where the t0 parameter (a negative age, doesn't make much sense) is gone and got replaced by the length at birth, l_0, which pressumably you can fix.

In addition to that reduction in the number of parameters, I'd try setting a higher number of iterations to something like 10000.

HTH

____________________________________________________________________________________ 

Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN




More information about the R-sig-mixed-models mailing list