Closed lijiaqi-github closed 8 months ago
Hi,
please find here some clarification regarding your points.
There is no need to exclude subjects with few measurements. The mixed model makes use of all information to estimate the trajectory, even if a single observation is available for some subjects.
You can include time-dependent variables in the fixed part (formula normMMSE~poly(age65, degree = 2, raw = TRUE) + CEP in this example). But for the survival part, only values at one specific time point (at baseline) can be included.
Such a specification is correct. The CEP and male variable will only have an effect an the hazard of dementia in that case.
Here we start from a 2 class model and add one class. We chose to second class (over the 3 total classes) to be the new one. The parameters related to class 2 are at position 1,3,4,11,14,and 17. Either you manage to determine these positions, which is not so obvious, either you run a 3 class model without optimization
mj3_0 <- Jointlcmm(.., ng=3, B=mj1, maxiter=0)
and see from mj3_0$best
where are the class 2 parameters.
Regarding the values we give to these parameters, they are rather arbitrary. We just make sure they make sense, but we don't strictly justify this choice. For example, we put 70 for the intercept in the mixed model. You see from figure 3 in the paper that the intercepts are between 60 and 80, so 70 sound possible.
I hope this will help!
Viviane
Dear Viviane,
So many thanks for you kind and careful explanation. That is very helpful.
I'll try to analyze it again based on your reply.
Jiaqi li
Dear Viviane,
Thank you again for your great package.
I am reading your vignette. I am not sure if there is something I missed, but I encountered an error message when I executed the following code. https://cecileproust-lima.github.io/lcmm/articles/latent_class_model_with_hlme.html#description-of-the-2-class-linear-mixed-model
Description of the 2-class linear mixed model Summary of the model
hlme(fixed = normMMSE ~ age65 + I(age65^2) + CEP, mixture = ~age65 +
I(age65^2), random = ~age65 + I(age65^2), subject = "ID",
ng = 2, data = paquid)
Error in hlme(fixed = normMMSE ~ age65 + I(age65^2) + CEP, mixture = ~age65 + :
Please specify initial values with argument 'B'
After adding "B = m1," the code worked perfectly.
I am not sure if there is any code that I missed. Just in case, I want to report this error.
Very sorry for asking so many questions.
I want to know how to determine the class of the original data using the predictive model.
For example, when I have a predictive model m3, and I want to determine which class the people in the original data (paquid) belong to, what should I do?
Thank you very much.
Hi,
you will find the classification in the $pprob output of the model (m3$pprob).
Viviane
Dear Cécile and dear Viviane,
Thank you for your great package.I am reading your Estimation of Extended Mixed Models Using Latent Classes and Latent Processes: The R Package lcmm and have some questions.
For the situation that some participants only had one or two participations. Should I exclude the ones with less attendance. If yes, what should be the minimum number of participations.
In page 41 "6.5. Jointlcmm examples, you said that "Note that the survival model only handles time-independent covariates". For example, in following model, we could not add time-varying variables such as ADL score in " survival = Surv(age_init, agedem, dem) ~ CEP + male", but could in " normMMSE ~ poly(age65, degree = 2, raw = TRUE) + CEP", is it right? or both one not? If I want to adjust ADL in survival model, I need to adjust baseline ADL. Is it right?
When I want to adjust the competition risk. For example, in "survival = Surv(age_init, agedem, dem) ~ CEP + male", dem= 2 is mortality (dem = 0: no dementia, dem = 1: dementia). the model shoud be "survival = Surv(age_init, agedem, dem) ~ cause1(CEP) + cause1(male)". Just adding cause1() ? or there is other code.
In page 41 "6.5. Jointlcmm examples, you give following code illustrates a reestimation of the three-class model using estimates of the two-class model as initial values along with arbitrary initial values for an additional class:
What I don't understand is how to determine where the parameters need to be added, and the logic of adding parameters. In the example in the text. The parameters are added at [c(1, 3, 4, 11, 14, 17)], and the added parameters are c(0, 0.11, 4, 70, 0, 0). I don't understand what the basis for these numbers is.
I look forward to hearing from you, and greatly appreciate any insight you have.
jiaqi li