Closed janstochl closed 1 year ago
Hi, the error thrown by the mclust::Mclust
function is usually caused by convergence problems.
Before diving deeper, you may first want to try to:
tsmatrix(hae_3, id = 'subjid', time = 'tpn', response = 'hae3', fill = FALSE)
, which should throw an error if this requirement is not satisfied.scale()
. This is typically the cause of convergence problem.control = emControl(...)
in the lcMethod specification, see mclust::emControl
for details.Hope this helps
Dear Niek, many thanks for your helpful response. The issue was indeed that some individuals did not have all timepoints in the datasets. I did not know this was a requirement for mclust. This is quite restrictive as it is often the case that some timepoints are missing, You also cannot add them (and fill with missing values) since missing data are not allowed in mclust either. Strange.
Anyway, I wanted to thank you very much for your kind guidance and also for fantastic latrend package.
All the best, Jan
Dne 14.09.2023 15:46:06, Niek Den Teuling @.***> napsal:
Hi, the error thrown by the mclust::Mclust function is usually caused by convergence problems.
Before diving deeper, you may first want to try to:
Hope this helps
— Reply to this email directly, view it on GitHubhttps://github.com/philips-software/latrend/issues/138#issuecomment-1719599906, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APXTWHH7CLYUIMQPUQMGAMDX2MKCRANCNFSM6AAAAAA4X2GX2I. You are receiving this because you authored the thread.Message ID: @.***>
Dear Jan,
It is restrictive indeed, but there are alternatives. If the missing data mechanism is non-informative, consider imputing the values, or use a parametric method. The kml package has some built-in options to impute data, which you can use through lcMethodKML
. For a parametric approach that can yield results similar to LLPA, GBTM is a good option (see lcMethodLcmmGBTM
.
If data is MNAR then you're in rough terrain as standard methods will not be applicable. Pattern mixture modeling will be of help here.
Best regards, Niek
That is super helpful, thank you Niek.
Jan
Dne 18.09.2023 9:17:11, Niek Den Teuling @.***> napsal:
Dear Jan,
It is restrictive indeed, but there are alternatives. If the missing data mechanism is non-informative, consider imputing the values, or use a parametric method. The kml package has some built-in options to impute data, which you can use through lcMethodKML. For a parametric approach that can yield results similar to LLPA, GBTM is a good option (see lcMethodLcmmGBTM.
If data is MNAR then you're in rough terrain as standard methods will not be applicable. Pattern mixture modeling will be of help here.
Best regards, Niek
— Reply to this email directly, view it on GitHubhttps://github.com/philips-software/latrend/issues/138#issuecomment-1722946415, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APXTWHFPEB36EGMQ2N63YZDX277QBANCNFSM6AAAAAA4X2GX2I. You are receiving this because you authored the thread.Message ID: @.***>
Hi, I cannot make the latent profile function work, I get the following error:
FYI my data ndo not include any Inf, NA or NaN values. It looks like it is related to specification of argument "z" in mclust function meEII, which according to mclust package is "A matrix whose [i,k]th entry is the conditional probability of the ith observation belonging to the kth component of the mixture."
Can you kindly check the issue please?
Thanks, Jan