I am using nlme
to run the following models:
library(nlme)
fm4Oats <- lme( yield ~ nitro, data = Oats, random = ~ 1 | Block/Variety )
fm4Oats2 <- lme( yield ~ nitro, data = Oats, random = ~ nitro | Block/Variety )
fm4Oats3 <- lme( yield ~ nitro, data = Oats, random = ~ nitro | Block )
fm4Oats4 <- lme( yield ~ nitro, data = Oats, random = ~ nitro | Variety )
Except for fm4Oats
, all other 3 models returned the same error message:
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (10)
I followed the post to add the control
argument:
fm4Oats5 <- lme(yield ~ nitro, data = Oats, random = ~ nitro | Variety,
control = list(msMaxIter = 1000, msMaxEval = 1000))
This led to a different error message:
Error in lme.formula(yield ~ nitro, data = Oats, random = ~nitro | Variety, :
nlminb problem, convergence error code = 1
message = singular convergence (7)
I am interested in why did I run into a convergence issue and what are possible solutions.