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

Simon Blomberg s.blomberg1 at uq.edu.au
Tue Jul 13 06:49:28 CEST 2010


I've had problems with this model and otolith data.  There were too few 
measurements per fish, and most of the measurements were at the 
beginning of the growth curve, hence estimating the asymptote was 
difficult. Ultimately, we ditched the vonBert model and simply fitted a 
linear model, so we could only look at growth in a very coarse way, but 
this was enough to detect treatment differences.

Cheers,

Simon.

On 13/07/10 14:11, Andrew Robinson wrote:
> Hi Michael,
>
> a few thoughts ...
>
> 0) how many fish do you have?  And, how many measurements per fish?
>
> 1) are you sure that you need all three parameters to be random?
>     Judicious use of nlslist and some graphics might provide insight as
>     to whether any of them can be simply fixed effects.  Doing so will
>     greatly simplify the model, See Section 8.1.3 of P&B.
>
> 2) I've fit models that have required more than 5000 iterations to
>     converge.  Try increasing the iterations to 10000.
>
> 3) Just as a side-note, I find your code hard to read.  I know that
>     the choice between '=' and '<-' is a matter of taste, but please
>     make more use of spaces!
>
> I hope that this helps,
>
> Andrew
>
> On Mon, Jul 12, 2010 at 11:06:03PM -0400, Michael Larkin wrote:
>    
>> 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
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>      
>    

-- 
Simon Blomberg, BSc (Hons), PhD, MAppStat.
Lecturer and Consultant Statistician
School of Biological Sciences
The University of Queensland
St. Lucia Queensland 4072
Australia
T: +61 7 3365 2506
email: S.Blomberg1_at_uq.edu.au
http://www.uq.edu.au/~uqsblomb/

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem

Statistics is the grammar of science - Karl Pearson.




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