CecileProust-Lima / lcmm

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

Comparability with SAS proc traj in specifying distributions and polynomials #148

Closed abduazizR closed 11 months ago

abduazizR commented 1 year ago

Hi,

First of all, I would like to thank you so much for the wonderful package. I am currently facing a problem with using the package, especially with the hlme function. I am currently working on a group-based trajectory model, and I was initially using proc traj in SAS, but I prefer to code in R.

My problem is that I cannot actually draw parallels between hlme and proc traj. For instance, in proc traj, I can specify the distribution of the outcome variable, but I don't know how to do so with hlme. I am currently working with 0/1 dependent variable, and I am not sure if I need to specify a binary distribution for that with hlme. Also, in proc traj, I can specify different polynomial orders (quadratic, cubic, etc) for different groups. I am not sure if the same is possible with any of lcmm packages.

I tried to search in the package's manual but could not find how to do these specifications.

Hope you can help me with this.

Thank you.

CecileProust-Lima commented 1 year ago

Hi, lcmm R package is dedicated to latent class mixed models. A major difference with SAS proc traj is that we usually recommend to incorporate random effects to properly account for the intra-individual correlation. This done with argument random=~. After that, if you specify random=~ - 1 then you can have the same type of methodology as in proc traj.

Other differences:

I hope this answers your question. I remember other issues discussing proc traj and lcmm. You might dig in the closed ones. Best Cécile