Closed tinaty closed 10 months ago
The splines link function refers to the distribution of the outcome, whereas the ns you use refer to the trajectory with time of your outcome. So both can be used simultaneously if you have a non-Gaussian outcome and you wish to have flexible trajectories with time.
Thanks Viviane, is there a way that could be used to determine which link function is the best?
@VivianePhilipps Hi Viviane,
Thank you for your advice.
As I have a non-Gaussian outcome, I first tried a splines link and splines function of time simultaneously, i.e. m3Splines <- lcmm(fixed = y ~ splines::ns(time), random=1+time, mixture= splines::ns(time), link='splines', ng=3, subject='id', data=mydata)
.
I also tried a model with a linear link and splines function of time, i.e. m3Linear <- lcmm(fixed = y ~ splines::ns(time), random=1+time, mixture= splines::ns(time), ng=3, subject='id', data=mydata)
.
However, m3Splines
shows much worse entropy (0.77) than the entropy of m3Linear
(0.90). I have enclosed the subject specific residuals of m3Splines
and m3Linear
below. Could you kindly advise if I should choose the model m3Linear
given that the primary goal of Latent Class Mixed Modeling is to capture heterogeneity in longitudinal trajectories, so the focus should be on the interpretation of the latent classes themselves despite the non-normality?
Hi,
we usually choose the link function in one class models. We estimate the several models differing only by the link function and choose the "best one", for example the one with better AIC. Then, we add latent classes and keep always the same link.
Best,
Viviane
Thanks a lot Viviane for your kind advice
Hi, I tried to use different link functions and different functions of time when fitting latent class mixed models on continous outcomes. I wonder what is the difference between
link='splines'
and splines function of time by usingsplines::ns(time)
? Can I use splines link function and in the meantime usesplines::ns(time)
, i.e.m3 <- lcmm(fixed = y ~ splines::ns(time), random=1+time, mixture= splines::ns(time), link='splines', ng=3, subject='id', data=mydata)
? Thank you for your advice.