lme convergence error: iteration limit reached without convergence (10)

Hello,

I have 2 different treatments (treatment) and 6 populations (variable) for each treatment, I want to see if there is a significant change in growth (value or logvalue) of each treatment over time (Tnum). I have attached my data plotted on a graph to try and show what I am looking at!


As this was an experimental evolution experiment time was actually transfer number, I just dropped the 'T' from transfers to make my 'Tnum' column to be a continuous variable.
In the mixed model I have attempted to fit, I have included variable in the random effects part as I also want to see whether time has a different effect on the different populations.

library(nlme)
pfumod1<-lme(logvalue~treatment*Tnum,random=~Tnum|variable,data=plaques2)

However when I try and fit the model I get this error in R:

'Error in lme.formula(logvalue ~ treatment * Tnum, random = ~Tnum | variable, :
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (10)'

I am not sure whether I have fitted the model incorrectly or how to avoid this error.
I tried fitting a model with the lme4 package instead (I'm not sure why I thought this would be any different)
and I have come up with a different error! Here is my code and the error.

library(lme4)
pfumod2<-lmer(logvalue~treatment*Tnum+(Tnum|variable),plaques2)

'Error: number of observations (=59) <= number of random effects (=60) for term (Tnum | variable); the >random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable'

I have included a reprex below- sorry if it is a bit long its the first one I have made but hopefully it is of use.

Thanks!

data.frame(
stringsAsFactors = FALSE,
treatment = c("RP","RP","RP","RP","RP",
"RP","RP","RP","RP","RP","RP","RP","RP","RP","RP",
"RP","RP","RP","RP","RP","RP","RP","RP","RP",
"RP","RP","RP","RP","RP","RP","P","P","P","P",
"P","P","P","P","P","P","P","P","P","P","P","P",
"P","P","P","P","P","P","P","P","P","P","P",
"P","P"),
Tnum = c("0","2","4","6","8","0",
"2","4","6","8","0","2","4","6","8","0","2","4",
"6","8","0","2","4","6","8","0","2","4","6",
"8","2","4","6","8","0","2","4","6","8","0",
"2","4","6","8","0","2","4","6","8","0","2","4",
"6","8","0","2","4","6","8"),
value = c(120000L,140000L,12000L,8000L,
1000000L,120000L,140000L,18000L,10000L,8000L,
160000L,60000L,200000L,5400L,400000000L,120000L,140000L,
14000L,20000L,20000L,100000L,140000L,10000L,
20000L,400000L,120000L,60000L,20000L,6000L,28000L,
1400000L,400000L,200000000L,100000000L,40000L,1200000L,
600000L,8000000L,400000000L,100000L,1200000L,4000000L,
2000000L,20000000L,80000L,1400000L,2000000L,
240000000L,2000000000L,80000L,1600000L,1600000L,400000000L,
400000000L,120000L,800000L,400000L,600000000L,
8000000L),
logvalue = c(11.6952470217642,
11.8493977015914,9.39266192877014,8.98719682066197,13.8155105579643,
11.6952470217642,11.8493977015914,9.7981270368783,
9.21034037197618,8.98719682066197,11.982929094216,
11.0020998412042,12.2060726455302,8.59415423255237,
19.8069751050723,11.6952470217642,11.8493977015914,
9.5468126085974,9.90348755253613,9.90348755253613,11.5129254649702,
11.8493977015914,9.21034037197618,9.90348755253613,
12.8992198260901,11.6952470217642,11.0020998412042,
9.90348755253613,8.69951474821019,10.2399597891573,
14.1519827945855,12.8992198260901,19.1138279245123,
18.4206807439524,10.5966347330961,13.9978321147582,
13.3046849341983,15.8949520996441,19.8069751050723,11.5129254649702,
13.9978321147582,15.2018049190842,14.5086577385242,
16.8112428315183,11.289781913656,14.1519827945855,
14.5086577385242,19.2961494813063,21.4164130175064,
11.289781913656,14.28551418721,14.28551418721,19.8069751050723,
19.8069751050723,11.6952470217642,13.5923670066501,
12.8992198260901,20.2124402131804,15.8949520996441),
variable = as.factor(c("RP1",
"RP1","RP1","RP1","RP1","RP2","RP2","RP2",
"RP2","RP2","RP3","RP3","RP3","RP3","RP3",
"RP4","RP4","RP4","RP4","RP4","RP5","RP5",
"RP5","RP5","RP5","RP6","RP6","RP6",
"RP6","RP6","P1","P1","P1","P1","P2","P2",
"P2","P2","P2","P3","P3","P3","P3","P3",
"P4","P4","P4","P4","P4","P5","P5","P5",
"P5","P5","P6","P6","P6","P6","P6"))
)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.