I'm trying to model a linear mixed effects model but whenever I tried to model interaction terms my model gives error about convergence. Although I tried to increase the number of iterations as possible solution I could not achieve to model interactions either. What are your suggestions about this?

With only main effects, my code works fine but ı need to interpret the interaction terms as well. Also I 'm not quite sure is it appropriate to model the fixed effects with only main effects, without interaction?

Any help would be greatly appreciated.

Thanks in advance!

  • $\begingroup$ Could you post some code and/or the output? $\endgroup$ – Mark White Apr 26 '17 at 21:16
  • $\begingroup$ How many samples and independent variables do you have? Did you initially include all first order interactions? $\endgroup$ – Michael Chernick May 20 '17 at 1:48
  • $\begingroup$ I have 3 independent variables, age, gender and unit (unit has 6 categories). I only include significant first order interactions to the model. $\endgroup$ – eee May 25 '17 at 16:39

Sorry for the late response. Here are the R codes that I've used:


lme.model2=lme(trsf~time*age+gender+unit, random = ~time+I(time^2)|id ,
               control='ctrl',na.action = na.omit,data = crp)


ctrl <- list(iter.EM=200,tol3=1e-09,numeriDeriv="cd",eps.Hes=1e-04)
jm.model2.uns<- jointModel(lme.model2,surv, timeVar = "time",control='ctrl')
Error in optim(thetas, opt.survWB, gr.survWB, method = "BFGS", control = list(maxit = if (it <  : 
non-finite value supplied by optim

Whenever I include the interaction term, joint model function gives the error but if I use only the main effects I don't get this kind of error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.