CecileProust-Lima / lcmm

R package lcmm
https://CecileProust-Lima.github.io/lcmm/
48 stars 13 forks source link

Difficulty running permut() #233

Closed cooperr11 closed 4 months ago

cooperr11 commented 7 months ago

Hi there,

I have run an initial model and am trying to change the reference class using permut(). However, the permuted model is not converging. My model: p2t<-hlme(norm_total~age_years+I(age_years^2), random=~age_years+I(age_years^2), ng=2,mixture=~age_years+I(age_years^2), B=p1,nwg=T, subject="id_num",data=data4) (where p1 is the same model with 1 group) To change the reference class: p2t_perm <- permut(p2t, order=c(2,1),estim=T)

Do you have any suggestions?

Thanks!

VivianePhilipps commented 5 months ago

Hi,

there are many reasons why a model doesn't converge. Maybe you just need more iterations, so you can run the model again, starting from the p2t_perm parameters. This is achieved with the following code : p2t_perm_2 <- hlme(norm_total~age_years+I(age_years^2), random=~age_years+I(age_years^2), ng=2,mixture=~age_years+I(age_years^2), nwg=T, subject="id_num",data=data4, B = p2t_perm, maxiter=200)

Please notice that we have of webpage where this issue is discussed : https://cecileproust-lima.github.io/lcmm/articles/usual_problems.html

Viviane