CecileProust-Lima / lcmm

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

trajectory plot using the fixed-model intercept #246

Closed strawberry07 closed 2 months ago

strawberry07 commented 6 months ago

Hi I was trying to plot the trajectories across time of different latent classes so I need to use the intercept and slope of each class in the fixed model, I should've used the second lcga3_results[["best"]][["intercept class1"]] which is 10.31 instead of the first one 1.12. The first one is class-membership model instead of fixed-model of time change. But the two numbers share the same index in the code so my trajectory plot is wrong. Screenshot 2024-03-17 at 9 30 05 AM

VivianePhilipps commented 6 months ago

Hello,

indeed, different parameters can have the same name. You can either change the names, or you use the predictY function (and the associated plot) that does the computations for you.

Viviane